radio buttons
| From: | Natividad Castro | Date: | Wed, 15 May 2002 12:07:16 +0000 |
| Subject: | radio buttons | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19191@lists.php.net to get a copy of this message | ||
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