nightswore
Programmer
So, here is my drop down list, the plan is to have it self update the database with its own value when a new one is selected. Basically this is for a status page, as you can tell from the complete/incomplete etc. Anyway it works up to a point; no matter what I select, it takes the value from the bottom "onselect" command and updates with it, rather than the corresponding value. I'll try to promptly answer questions, as I tend to make no sense sometimes.
<select name="bodystatus" id="select" onchange=$_SERVER ['PHP_SELF']>
<option value='N/A' onselect=<? mysql_query("UPDATE `getready` SET `status` = 'N/A'"); ?> >N/A</option>
<option value='waiting' onselect=<? mysql_query("UPDATE `getready` SET `status` = 'Waiting'"); ?> >Waiting</option>
<option value='in progress' onselect=<? mysql_query("UPDATE `getready` SET `status` = 'In Progress'"); ?> >In Progress</option>
<option value='incomplete' onselect=<? mysql_query("UPDATE `getready` SET `status` = 'Incomplete'"); ?> >Incomplete</option>
<option value='complete' onselect=<? mysql_query("UPDATE `getready` SET `status` = 'Complete'"); ?> >Complete</option>
</select>
<select name="bodystatus" id="select" onchange=$_SERVER ['PHP_SELF']>
<option value='N/A' onselect=<? mysql_query("UPDATE `getready` SET `status` = 'N/A'"); ?> >N/A</option>
<option value='waiting' onselect=<? mysql_query("UPDATE `getready` SET `status` = 'Waiting'"); ?> >Waiting</option>
<option value='in progress' onselect=<? mysql_query("UPDATE `getready` SET `status` = 'In Progress'"); ?> >In Progress</option>
<option value='incomplete' onselect=<? mysql_query("UPDATE `getready` SET `status` = 'Incomplete'"); ?> >Incomplete</option>
<option value='complete' onselect=<? mysql_query("UPDATE `getready` SET `status` = 'Complete'"); ?> >Complete</option>
</select>