Re: Another PHP problem

by "Rossi Designs" <webmaster(at)rossidesigns.net>

 Date:  Mon, 24 Apr 2000 08:52:00 -0400
 To:  <Reywob(at)aol.com>,
<hwg-languages(at)hwg.org>
 References:  aol
  todo: View Thread, Original
Is this what you want?

<?PHP
if (!isset($site)) {
$sitecss = "http://www.narrowgauge.f2s.com/style.css";
$sitename = "Narrow Gauge on the web";
$siteurl = "http://www.narrowgauge.f2s.com";
} 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...
}
?>

If not maybe you could use a switch() statement instead of if() statements.

Rossi Designs
PO Box 1084
Holly Hill, FL 32125-1084
Phone : (904) 226-8979
URL : http://rossidesigns.net
----- Original Message -----
From: <Reywob(at)aol.com>
To: <webmaster(at)rossidesigns.net>; <hwg-languages(at)hwg.org>
Sent: Monday, April 24, 2000 3:20 AM
Subject: Re: Another PHP problem


| 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
|

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