Whoops!

$command = isset($HTTP_POST_VARS['action']) and $HTTP_POST_VARS['action'] == "data_input") ? "check" : "display";



Daniel J. Rychlik wrote:

I recieved a unexpected T_LOGICAL_AND, expecting ',' or ')';



----- Original Message ----- From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: "Daniel J. Rychlik" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, June 14, 2003 10:22 AM
Subject: Re: [PHP] $command actions





$command = isset($HTTP_POST_VARS['action'] and $HTTP_POST_VARS['action']


== "data_input") ? "check" : "display";




Daniel J. Rychlik wrote:



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


<[EMAIL PROTECTED]> gave me, and it worked great checking the isset before
declaring in my form. Im hoping that this is just as simple.


-Dan




--
The above message is encrypted with double rot13 encoding. Any


unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.



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








-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.



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



Reply via email to