GetDotted Domains

Viewing Thread:
"PHP help..."

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.

Wed 15/10/03 at 22:40
Regular
"Peace Respect Punk"
Posts: 8,069
Yeah, so I'm trying to write some PHP...
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
Thu 16/10/03 at 17:24
Regular
"Peace Respect Punk"
Posts: 8,069
Turbonutter wrote:
> 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!
Thu 16/10/03 at 07:53
Regular
"Eff, you see, kay?"
Posts: 14,156
You're inept.

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.
Wed 15/10/03 at 23:00
Regular
"Peace Respect Punk"
Posts: 8,069
Hmmm, tried that, get the same error...

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...
Wed 15/10/03 at 22:51
Regular
"It goes so quickly"
Posts: 4,083
Loose the ';' after each empty() call.

You don't want to tell PHP to end a command in the middle of an if statement like you have got there.
Wed 15/10/03 at 22:40
Regular
"Peace Respect Punk"
Posts: 8,069
Yeah, so I'm trying to write some PHP...
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

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Great services and friendly support
I have been a subscriber to your service for more than 9 yrs. I have got at least 12 other people to sign up to Freeola. This is due to the great services offered and the responsive friendly support.
Many thanks!
You were 100% right - great support!

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.