Well, this is strange but I seem to have found the problem.
When I set the drop list, I use two temp variables:
$title and $titleId.
I use them to store the values of the current row in the query result, and then as i loop through, I print out something like
<option value=\"$titleId\">$title
When the user hits SUBMIT, it reloads the current page, and there is an IF statement at the top that checks to see if the form was submitted. If so, it does some error checking, and if everything is OK, it creates the session variables.
Now, someone explain this to me. If I create a session variable with the name "title", it will store the last value that $title held. And same with "titleId". The last values were
$titleId = 15
and
$title = "Wardrobe"
So, if I did this:
$SESSION['title'] = $POST['title']
instead of the session variables being set to the VALUE of the POST variable value, it would be set to wardrobe. And, if I used "titleId" as my variable, which I did, it would be set to 15.
Isn't that strange? Because, at the time the variables are being set, I've reloaded the page and I haven't even gotten back down where $title and $titleId are used (I redirect with the header line).