Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using If . . and ... or 1

Status
Not open for further replies.
Feb 16, 2003
87
GB
Hello!

Any ideas why this won't work:

if ($FORM{'tld'} eq ".co.uk" or $FORM{'tld'} eq ".org.uk") AND ($FORM{'regtype'} eq "new"){ &something; }

I've tried all different conatations, basically I need it to goto &something if tld equals either .co.uk or .org.uk AND regtype eq new.

Hummmm - hope that makese sense to one of you!!!

Simon

 
Try this, don't see why it shouldn't work,

if (($FORM{'tld'} eq ".co.uk" || $FORM{'tld'} eq ".org.uk") && ($FORM{'regtype'} eq "new"))
{ &something; }


Ryan
 
Thanks Ryan - that was spot on!

There's a lot of brackets to get in the right place there! That's where I was getting mixed up!

Cheers

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top