Re: Submit Split
| From: | Martin Clifford | Date: | Wed, 19 Jun 2002 13:50:30 +0000 |
| Subject: | Re: Submit Split | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19875@lists.php.net to get a copy of this message | ||
You are using the asignment operator ("=") instead of the equality operator
("==") in your conditionals. You're setting $Array[Approval] equal to
"YES", everytime, therefore it is always evaluated as true and the word "Hello"
is echo'd in the HTML.
Don't worry about it, it happens to all of us, but try to keep it in mind; it'll save you
some sanity.
Martin :o)
>>> Shaun Sandy <Sandys@nu.ac.za> 06/19/02 04:16AM >>>
Hi there,
I am relatively new to PHP and am having some difficulty in a current project.
I need to have a form submit to one group of people, if their radio button is marked, or to another
group, if theirs is marked.
I've tried the following with no luck, could you suggest how I might get this to work, or is
there a better way to do it?
From the form, where the radio buttons are named: Array[Approval] with values YES and NO I then post
them to a handler containing the following php:
<?PHP
if ($Array[Approval] = "YES") {
print ("Hello");
}elseif ($Array[Approval] = "NO") {
print ("Goodbye");
}
?>
The result I get no matter which button is selected is Hello.
I'd really appreciate any help.
Thanks,
Shaun.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php