Posted by Schraalhans Keukenmeester on 03/28/07 17:15
rynato@gmail.com wrote:
> whatever code I put inside this IF statement:
>
> if ($_SERVER['REQUEST_METHOD'] == 'POST')
>
> I get a parse error. Even 'print "something goes here"' doesn't work.
> Any ideas?
>
If you get a parse error you probably have a syntactic error earlier in
the code you have this line in. What do you mean exatly by: "whatever I
put inside this IF statement?" Something like this?
if ($var=='somestring') {
do_something_or_other(); // <== you mean this bit?
}
Please post a larger chunk of the code the statement is part of, then
maybe there's something we can help you with. Like it is the statement
should be ok, assuming it is followed by at least a (empty or
meaningful) statement.
In other words: if (true); is correct, without the ; it's an error.
[Back to original message]
|