$command actions
| From: | Daniel J. Rychlik | Date: | Sat, 14 Jun 2003 15:17:00 +0000 |
| Subject: | $command actions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-151483@lists.php.net to get a copy of this message | ||
I have a line of code in my form that I am trying to get to work.
$action = ($HTTP_POST_VARS['action'] == "data_input") ? "check" :
"display";
I recieved undefined action when running. So I did this.
$command = isset($HTTP_VARS['action'] == "data_input") ? "check" :
"display";
I recieve unexpected T_IS_EQUAL, expecting ',' or ')'
Ive tried a couple different ways to isolate my syntax. I am using the example from
http://www.zend.com/zend/spotlight/form-pro-php4.php
Ive also read this document and I understand it.
http://ca2.php.net/manual/en/language.expressions.php
I know that is my syntax, I followed the example that Lars Torben Wilson <torben@php.net>
gave me, and it worked great checking the isset before declaring in my form. Im hoping that this is
just as simple.
-Dan