OK, I see what you're saying. But I still am confused about how I get the current state of the dropdown to be passed into the database.
Now, I have a php file xxx.php:
PHP Code:
<?php
error_reporting(7);
require('./global.php');
// The Matrix!!!
if ($HTTP_POST_VARS['action']=="Update Matrix") {
$templatesused = 'redirect_updatethanks';
$DB_site->query("UPDATE userfield SET field6=field6 WHERE userid=$bbuserinfo[userid]");
eval("standardredirect(\"".gettemplate("redirect_updatethanks")."\",\"index.php?s=$session[sessionhash]\");");
}
// The Matrix!!!
?>
And my template looks like this:
Code:
<form action="matrix.php" name="updatematrixform" method="post">
<select size="1" name="field6"><option value="TheValue" >TheValue</option><option value="TheValue1" >TheValue1</option><option value="TheValue2">TheValue2</option><option value="TheValue3">TheValue3</option></select>
<br>
<input type="submit" name="action" value="Update Matrix">
</form>
So, when I hit the submit button it processes the php file correctly and redirects me to the updatethanks template and then back to index.php. What it "does not" do is update the mysql with what ever I've chosen from the drop down. That is the problem.