My form currently collects data entered by the user, and then presents it in a particular format on a new page.I would like this data that is presented on my new page to be sent automatically via email to the admin aswell.
I've looked around for the Mail function in PHP but I cannot seem to send form data collected from a dropdown menu and neither can I control how the output is being sent via email.
<form action="dealform.php" method="post">
<div class="form-row">
<div class="col">
<label for="amount">Currency</label>
<select class="form-control" name="currency" id="exampleFormControlSelect1">
<option disabled selected value> -- select a Currency -- </option>
<option value="€">EUR</option>
<option value="$">USD</option>
<option value="A$">AUD</option>
<option value="£">GBP</option>
<option value="₽">Rouble</option>
<option value="R">Rand</option>
<option value="¥">Yen</option>
</select>
</div>
<div class="col">
<label for="amount">Amount</label>
<input type="text" class="form-control" name="amount" id="amount" >
</div>
</div>
<br>
<button type="submit" class="btn btn-primary">Submit</button>
<button type="reset" class="btn btn-primary">Reset</button>
</form>
And this is the dealform.php:
<p>
Amount: <?= $_POST["currency"] ?> <?= $_POST["amount"] ?>
</p>
At the moment when I click submit the selected currency and amount show up neatly like the following example: Amount: $100.
I cannot seem to send this information automatically to an email of my choice in this format, am I missing something?