I am making a webpage that will alow people to view images of models by choosing a model and an image number, however whenever anyone tries to change models, it seems to be stuck on Alexa.
Here is the code...
THIS IS THE CODE FOR INDEX.PHP
<?php
if (empty($model))
{
$model = "Select A Model";
include 'header.php';
include 'firstvisit.php';
include 'footer.php';
}
else
{
if ($model = "Alexa") $path = "alexablkdrscch";
elseif ($model = "Alexia and Tyler") $path = "alextwgrsbg";
elseif ($model = "Allisin") $path = "aliovergr";
elseif ($model = "Annie and Hanna") $path = "anihangg";
elseif ($model = "Erica") $path = "erccampjungle";
elseif ($model = "Kaylee") $path = "kaybluelng";
elseif ($model = "Monica") $path = "moniroselng";
elseif ($model = "Sydney") $path = "sydfence";
include 'header.php';
include 'photos.php';
include 'footer.php';
}
?>
THIS IS THE CODE FOR PHOTOS.PHP
<div align="center">
<?php if (empty($pic)) $pic = "001"; ?>
<img src="images/<?php echo $path . $pic . ".jpg\">"?>
</div>
THE HEADER ONLY HAS 1 LINE OF CODE
<? echo $model ?>
THE FOOTER DOESN'T HAVE ANY PHP CODE
And the FIRST VISIT.php page only contains links like the following,
index.php?model=Kaylee&pic=001
Not sure why the variable refuses to change, the code seems to be in the right order.
Variable Stays the same even when url assigns new value...
Moderator: General Moderators
- ILoveJackDaniels
- Forum Commoner
- Posts: 43
- Joined: Mon May 20, 2002 8:18 am
- Location: Brighton, UK
Code: Select all
if ($model = "Alexa") $path = "alexablkdrscch";Code: Select all
if ($model їb]==ї/b] "Alexa") $path = "alexablkdrscch";Thanks Lots
That would be the problem, all is well now:) I have only been coding php for about a week now, I was thinking VB when I wrote that...