Re: [PHP] "OR" Problems
Thank you s much david. "David Robley" <[EMAIL PROTECTED]> wrote in message 01072515394001.32266@www">news:01072515394001.32266@www... > On Wed, 25 Jul 2001 13:36, J S R wrote: > > Shouldn't this work? I did it because I want the link to change to the > > "top-alt" class when the certain link is selected. > > > > but when i do this... they "if" statement is always active even if its > > not on the page. > > > > what am i doing wrong. > > Several things, by the looks of it :-: > > > > > > $name = getenv ("SCRIPT_NAME"); > > ?> > > > > > if($name == "/site/portfolio.php" or "/site/portfolio-ps.php) > > if($name == "/site/portfolio.php" or $name == "/site/portfolio-ps.php) > { > > > echo " > height=\"1\"> > href=\"portfolio.php\">portfolio"; > > else > > } else { > > > echo " > height=\"1\"> > href=\"portfolio.php\">portfolio" ?> > >> if($name == "/site/services.php" or "/site/services-ws.php") > > echo " > height=\"1\"> > href=\"services.php\">services"; else > > echo " > height=\"1\">services" > > ?> > >> if($name == "/site/casestudies.php" or "/site/casestudies-ap.php") > > echo " > height=\"1\">case > > studies"; > > else > > echo " > height=\"1\">case > > studies" > > ?> > > and there are a few more of thtose down the page. I'll leave you to sort > them out :-) > > -- > David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc > CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA > >"I'm embarrassed," Tom admitted readily. -- 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]
Re: [PHP] "OR" Problems
On Wed, 25 Jul 2001 13:36, J S R wrote: > Shouldn't this work? I did it because I want the link to change to the > "top-alt" class when the certain link is selected. > > but when i do this... they "if" statement is always active even if its > not on the page. > > what am i doing wrong. Several things, by the looks of it :-: > >$name = getenv ("SCRIPT_NAME"); > ?> > > if($name == "/site/portfolio.php" or "/site/portfolio-ps.php) if($name == "/site/portfolio.php" or $name == "/site/portfolio-ps.php) { > echo " height=\"1\"> href=\"portfolio.php\">portfolio"; > else } else { > echo " height=\"1\"> href=\"portfolio.php\">portfolio" ?> >if($name == "/site/services.php" or "/site/services-ws.php") > echo " height=\"1\"> href=\"services.php\">services"; else > echo " height=\"1\">services" > ?> >if($name == "/site/casestudies.php" or "/site/casestudies-ap.php") > echo " height=\"1\">case > studies"; > else > echo " height=\"1\">case > studies" > ?> and there are a few more of thtose down the page. I'll leave you to sort them out :-) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA "I'm embarrassed," Tom admitted readily. -- 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]
RE: [PHP] "OR" Problems
Why aren't you using the brackets? if (statement){ } else { } SED -Original Message- From: J S R [mailto:[EMAIL PROTECTED]] Sent: 25. júlí 2001 04:06 To: [EMAIL PROTECTED] Subject: [PHP] "OR" Problems Shouldn't this work? I did it because I want the link to change to the "top-alt" class when the certain link is selected. but when i do this... they "if" statement is always active even if its not on the page. what am i doing wrong. portfolio"; else echo "portfolio" ?> services"; else echo "services" ?> case studies"; else echo "case studies" ?> -- 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]
[PHP] "OR" Problems
Shouldn't this work? I did it because I want the link to change to the "top-alt" class when the certain link is selected. but when i do this... they "if" statement is always active even if its not on the page. what am i doing wrong. portfolio"; else echo "portfolio" ?> services"; else echo "services" ?> case studies"; else echo "case studies" ?> -- 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]