|
Posted by calzephyr on 10/14/06 23:49
Hi group,
I recently switched hosts, and now my main controller page for my
website isn't working correctly anymore. It worked fine on the old
host. The new host uses 5.0.4 whereas the old host used PHP 4.*.
I used switch statements to swap out text and graphics depending on the
parameters defined in the URL. Now it looks like the controller page is
ignoring them.
Here's the page:
http://www.purple-pony.com/main.php?ID=0&S=0
When you click "Work" or "Links" you should get different content as
well as different images, but it seems to be defaulting to the "About"
page all the time.
Here is a sample of the switch statement I used:
<?php
switch ($S)
{
case 0:
echo "<img src=pix/about.gif border=0 /><br />";
break;
case 1:
echo "<img src=pix/work.gif width=64 height=33 alt=Work border=0
/><br />";
break;
case 2:
echo "<img src=pix/paintings.gif width=99 height=35 alt=Paintings
border=0 /><br />";
break;
case 3:
echo "<img src=pix/photos.gif width=74 height=31 alt=Photos border=0
/><br />";
break;
case 4:
echo "<img src=pix/photos.gif width=105 height=34 alt=Photos border=0
/><br />";
break;
case 5:
echo "<img src=pix/links.gif width=53 height=31 alt=Links border=0
/><br />";
break;
case 6:
echo "<img src=pix/thisnthat.gif width=133 height=32 alt=This N That
border=0 /><br />";
break;
case 7:
echo "<img src=pix/shop.gif width=56 height=37 alt=Shop border=0
/><br />";
break;
default:
echo "No number between 1 and 3";
}
?>
Has any syntax changed from 4 to 5? I'm something of a PHP noodler, so
I'm by no means an expert. Any suggestions would be appreciated.
Thanks,
Christine
Navigation:
[Reply to this message]
|