The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Well, I have the following line:
if (empty($Name)); or (empty($Email)); or (empty($PhoneNo)); or (empty($Address));
and when I run the PHP, I get the error:
Parse error: parse error, unexpected T_LOGICAL_OR
I think it has something to do with the "or" statements... but I dunno what, as from what I've seen looking on various websites the "or" is valid...
Any ideas?
Cheers
Sibs
> You're inept.
Thank you.
> I'm very dubious of whether you really know what you're doing though.
> That statement had no parenthesis (or alt syntax), it made no sense
> at all.
I don't know what i'm doing. This is pretty much the first time I've tried to write PHP on my own from scratch... it obviously shows. Anyway, thanks, it seems to be working now!
if (empty($Name)); or (empty($Email)); or (empty($PhoneNo)); or (empty($Address));
Just the first "clause" before the or:
if (empty($Name));
That is obviously a complete if statement :-)
The line should be:
if (empty($Name) or empty($Email) or empty($PhoneNo) or empty($Address)) {
I'm very dubious of whether you really know what you're doing though. That statement had no parenthesis (or alt syntax), it made no sense at all.
It won't be anything to do with the variables will it? All the variables in the empty() are from a form, I gather that if you're posting a form to PHP, the data entered into the form is available as "$whatever" where 'whatever' is the name tag of any form element...?
Can't think of anything else...
You don't want to tell PHP to end a command in the middle of an if statement like you have got there.
Well, I have the following line:
if (empty($Name)); or (empty($Email)); or (empty($PhoneNo)); or (empty($Address));
and when I run the PHP, I get the error:
Parse error: parse error, unexpected T_LOGICAL_OR
I think it has something to do with the "or" statements... but I dunno what, as from what I've seen looking on various websites the "or" is valid...
Any ideas?
Cheers
Sibs