I feel fairly new to this as well but I think that, whilst your logic is
right, the syntax may be a little off.

if ($action == "textstring)
{
 echo "true";
}
else
{
 echo "false";
}

Above should show how the syntax will rok.

Good luck

Michael

phantom wrote:
> 
> Bear with me, new to PHP and got a beginner's questions
> 
> How do I run an if statement and the if statement compares a String?
> 
> IN ASP (yes I Know, ASP is evil) I would have wrote
> 
> if (String(Request("Action"))=="Submit")
>       do this
> 
> In PHP I have tried
> 
> if ($Action == "Submit")  but I get a parse error in that statement.
> What am I doing wrong?  Thank you.  I did an echo $Action to confirm
> that it's value is Submit.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to