Re: Another PHP problem

by "Cyanide _7" <leo7278(at)hotmail.com>

 Date:  Mon, 24 Apr 2000 02:57:48 CDT
 To:  Reywob(at)aol.com
 Cc:  hwg-languages(at)hwg.org
  todo: View Thread, Original
then dont put the next code in the else. just make your check on $site 
before your other code:

<?PHP
  if (!isset($site)) {
  $site = "";
  }

  if ($site == "pwp") {
  $sitecss = "http://members.aol.com/reywob/newstyle.css";
  $sitename = "Peters Web Page";
  $siteurl = "http://members.aol.com/reywob";
  } elseif ($site == "rm") {
  ...more here...
  } else {
  $sitecss = "http://www.narrowgauge.f2s.com/style.css";
  $sitename = "Narrow Gauge on the web";
  $siteurl = "http://www.narrowgauge.f2s.com";
  }
  ?>

- Cyanide_7

>
>I tried that, but it wouldn't work.  If I do that then it won't recognize 
>the
>} else{ statement.  What's the fault in my code?
>
><?PHP
>if (!isset($site)) {
>$site = "";
>} elseif ($site == "pwp") {
>$sitecss = "http://members.aol.com/reywob/newstyle.css";
>$sitename = "Peters Web Page";
>$siteurl = "http://members.aol.com/reywob";
>} elseif ($site == "rm") {
>...more here...
>} else {
>$sitecss = "http://www.narrowgauge.f2s.com/style.css";
>$sitename = "Narrow Gauge on the web";
>$siteurl = "http://www.narrowgauge.f2s.com";
>}
>?>
>
>See it at http://www.narrowgauge.f2s.com/phorum

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA