Request Variable to sort Email sent in UE from a Registration Form
I have a UE registration form that sends data to a database and also sends two emails, one to the administrators and one to the person registering.
When a person registers they select a member organisation from a drop down which submits the record number of that organisation to the database.
When the admins receive the email it shows the record number and not the unit name.
<?php echo((isset($_POST["unit"]))?$_POST["unit"]:"") ?>
How would I get the unit name to show instead?
I have tried linking the unit name
<?php echo $row_unit['unit_name']?>
But this just displays the first unit name in the database.
So how do I show the unit name that corresponds to the unit number submitted in the form?
If I do this
SELECT units.unit_name
FROM units
WHERE units.unit_id
How would I do
WHERE units.unit_id = Request Variable?
or whatever is required to show the name based on the session variable sent from the submitted form?