We need more of your code, as far as I can tell the variables $verify, and 
$first_reject don't exist and since they don't it doesn't matter which button is 
selected the value is blank. 

Radio buttons are a little odd... in this case depending on which is selected it will 
either assign $verify or $first_reject to the variable $status. However, neither seems 
to be set, hence $status has no value.

<>< Ryan

-----Original Message-----
From: Natividad Castro [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 15, 2002 6:07 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] radio buttons


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


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to