I have a form that is being represented with the values filled out from the database, and I am disabling the first and last name since my UPDATE query is using these values in the WHERE clause. I am using a $SESSION variable in the query but it is blank (Iknow because I threw an echo of the variable into the code and it doesn't UPDATE). Here is the code that affects that part.
echo "<tr><td width=20% align = right>First Name: </td><td width=80%><input type='text' name ='first_name'size=80 $disabled[0] value='$_SESSION[first]'></td></tr>";
echo "<tr><td width=20% align = right>Last Name: </td><td width=80%><input type='text' name='last_name'size=80 $disabled[0] value='$_SESSION[last]'></td></tr></table>";
$first =$_SESSION["first"];
$last = $_SESSION["last"];
As expected the First and last names do appear in the form only greyed out and you can not edit them, but when submit is clicked the $last variable seems to vanish, if I enable the fields with $disabled[1] which = "" (blank) it works fine. Is the field first_name and last_name setting my $_SESSION[first] and $_SESSION[last] to blank? If so how to keep the disabled and wtill make the query WHERE clause work.