I need some help with getting checkbox values sent to email using phpmailer
I have not done it before so unsure how to do it, the current code I have is below
$postData = $_POST;
$oneway = $_POST['oneway'];
$return = $_POST['return'];
$htmlContent = '<h2>Contact Form Details</h2>
<p><b>One Way:</b> ' . $oneway . '</p>
<p><b>Return:</b> ' . $return . '</p>
<form action="#errors" method="post" class="formontop">
<div class="booking-form">
<div class="row mb-4">
<div class="col-lg-6">
<div class="form-check">
<input type="checkbox" name="oneway" class="form-check-input" value="<?php echo !empty($postData['oneway'])?$postData['oneway']:''; ?>">
<label class="form-check-label" for="oneway">
One Way
</label>
</div>
</div>
<div class="col-lg-6">
<div class="form-check">
<input type="checkbox" name="return" class="form-check-input" value="<?php echo !empty($postData['return'])?$postData['return']:''; ?>">
<label class="form-check-label" for="return">
Return
</label>
</div>
</div>
<button class="default-btn" type="submit" name="submit">Get My Quote</button>
</div>
</div>
</form>