I am working through a tutorial on lusing sessions. I have a form that works for the most part, passing the variables from one form to another. However, I have a drop-down menu list and the value is not passed. I am including the code below. All the text field values are passed okay. It is the 'color' field that doesn't get passed. The following code is for the page resulting from the form submission. What am I missing?
<?php
session_start();
header("Cache-control: private"); //IE 6 Fix
echo "<strong>Step 2 - Register Session<br />";
// Get the user's input from the form
$first = $POST['first'];
$last = $POST['last'];
$address = $POST['address'];
$city = $POST['city'];
$phone = $POST['phone'];
$email = $email['email'];
$color = $_color['color'];
// Register session key with the value
$SESSION['first'] = $first;
$SESSION['last'] = $last;
$SESSION['address'] = $address;
$SESSION['city'] = $city;
$SESSION['email'] = $email;
$SESSION['phone'] = $phone;
$_SESSION['color'] = $color;
//Display the information:
?>
Welcome to my website <i><? echo $SESSION['first']; ?> <? echo $SESSION['last']; ?></i>
<br />
Can I call you at <strong><? echo $_SESSION['phone']; ?></strong>?
<br />
Are you really from <i><? echo $SESSION['city']; ?></i>?
<br />
Is your favorite color actually <i><? echo $SESSION['color']; ?></i>
<br />
Let's see what happens on the <a href="page3.php">next page.</a><br /><br />