My PhP file is not picking up the variables from my HTML form : <p>i have created a form with a PHP file, this is for a booking request and the aim is to get the variables sent to an email address. But for some reason the variables.</p>

<p>Below is the code for my html arm:</p>

<pre><code>&lt;form action="form.php" method="post"&gt;
        &lt;fieldset&gt;
            &lt;legend&gt;Book your Journey&lt;/legend&gt;
            &lt;label for ="name"&gt;Name:&lt;/label&gt;
            &lt;input type="text" id="name" name="name"&gt;
            &lt;label for="number"&gt;Phone Number&lt;/label&gt;
            &lt;input type="number" id="number" name="number"&gt;
            &lt;/fieldset&gt;
            &lt;fieldset&gt;
            &lt;label for="email"&gt;Email:&lt;/label&gt;
            &lt;input type="email" id="email" name="user_email"&gt;
            &lt;label for="pickup"&gt;Pick Me Up From&lt;/label&gt;
            &lt;input type="text" id="pickup" name="pickup"&gt;
            &lt;label for="date"&gt;Date&lt;/label&gt;
            &lt;input type="text" id="datepicker" name="date"&gt;
            &lt;label&gt;Time:&lt;/label&gt;
            &lt;select&gt;
                &lt;option&gt;--HR--&lt;/option&gt;
                &lt;option value="1"&gt;01&lt;/option&gt;
                &lt;option value="2"&gt;02&lt;/option&gt;
                &lt;option value="3"&gt;03&lt;/option&gt;
                &lt;option value="4"&gt;04&lt;/option&gt;
                &lt;option value="5"&gt;05&lt;/option&gt;
                &lt;option value="6"&gt;06&lt;/option&gt;
                &lt;option value="7"&gt;07&lt;/option&gt;
                &lt;option value="8"&gt;08&lt;/option&gt;
                &lt;option value="9"&gt;09&lt;/option&gt;
                &lt;option value="10"&gt;10&lt;/option&gt;
                &lt;option value="11"&gt;11&lt;/option&gt;
                &lt;option value="12"&gt;12&lt;/option&gt;
            &lt;/select&gt;
            &lt;label&gt;:&lt;/label&gt;
            &lt;select&gt;
                &lt;option&gt;--MIN--&lt;/option&gt;
                &lt;option value="00"&gt;00&lt;/option&gt;
                &lt;option value="15"&gt;15&lt;/option&gt;
                &lt;option value="30"&gt;30&lt;/option&gt;
                &lt;option value="45"&gt;45&lt;/option&gt;
            &lt;/select&gt;
            &lt;select&gt;
                &lt;option value="am"&gt;am&lt;/option&gt;
                &lt;option value="pm"&gt;pm&lt;/option&gt;
            &lt;/select&gt;
        &lt;/fieldset&gt;
        &lt;fieldset&gt;
            &lt;label for="destination"&gt; Destination Postal Code &lt;/label&gt;
            &lt;input type="text" id="destination" name="destination"&gt;
        &lt;/fieldset&gt;
        &lt;button&gt;Submit&lt;/button&gt;
    &lt;/form&gt;
</code></pre>

<p>and now my php code for this form is as follows</p>

<pre><code>&lt;?php

$to = 'test@gmail.com';
$subject = 'Booking';

$name = $_POST['name'];
$email = $_POST['email'];
$pickup = $_POST['pickup'];
$destination = $_POST['destination'];
$date = $_POST['date'];


$message = &lt;&lt;&lt;Eod
Hi, please pick up $name from $pickup and drop to $destination
Eod;

$header = $email;

mail($to, $subject, $message, $header);


echo "Message Sent";

?&gt;
</code></pre>

<p>Now, when i receive the email i can see only $destination gets picked up. Have i done something wrong in my html, it looks fine to me. Also, how do i get my select elements as a variable.</p>
