Hi everyone,
I have two radio buttons. Depending on what the users choose I will run an
update statement.
The field that needs to be update are
code_source and verify if radio button 1 is selected
ELSE
UPDATE
reason_rejected and first_reject if radio button 2 is selected
this my two buttons
<input name="status" type="RADIO" value="<? echo $verify; ?>">Approved
<input name="status" type="RADIO" value="<? echo $first_reject; ?>">No
Approved
The values for the radio buttons I'm assigning from a table. Both are enum
data type.
This is my code, but it doesn't work properly. It will update only
reason_rected and first_reject fields no matter what radio button a select.
$query = ("update project set source_code='$source_code', verify='yes' where
verify = '$status'");
$test_result = mysql_query($query);
if (!$test_result)
{
$query = ("update project set reason_rejected='$reason_rejected',
first_reject='yes' where first_reject = '$status'");
$test_result2 = mysql_query($query);
}
Any help is greatly appreciate it
Thanks in advanced
Nato
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php