...

View Full Version : image gallery help



aspdude2004
05-16-2004, 05:23 PM
<html>

<head>
<title></title>
</head>

<body>
hello
<?
// change this to the amount of images ;)
$image_amount = 005;
// make this the source for the NEXT icon please include the extension
// eg next.gif
$nex = "something.gif";
// make this the source for the BACK icon please include the extension
// eg back.gif
$bac = "something.gif";

// be careful when editing below this line
$image = $_GET['image'];
// if there is nothing after the .php set it as no 1
if (!$image) {
$image = 001;
}
// print the image
echo = "<img src=\"ntsk".$image.".gif\">";
// print the nexts etc
echo "Image ".$image." out of ".$image_amount."";
if ($page != "001" || $page != $image_amount} {

<br>
$image_new = $image++;
$image_old = $image--;
echo = "<a href=\"gallery.php?image=".$image_old."\"><img src=\"".$bac."\"></a>";
echo = "<a href=\"gallery.php?image=".$image_new."\"><img src=\"".$nex."\"></a>";

}elseif ($page == "001") {
echo = "<img src=\"".$bac."\">";
echo = "<a href=\"gallery.php?image=".$image_new."\"><img src=\"".$nex."\"></a>";
} elseif ($page == $image_amount) {
echo = "<a href=\"gallery.php?image=".$image_old."\"><img src=\"".$bac."\"></a>";
echo = "<img src=\"".$nex."\">";
}
echo "<hr color=\"black\" height=\"1\">";





?>

</body>

</html>


Please could you tell me what is wrong with this code?

firepages
05-16-2004, 05:32 PM
I gave up after the fourth or fifth parse error..

if your browser is not showing you the errors add
<?php error_reporting(E_ALL);?>
to the top of your script ... they are all simple parse errors

couple of hints ...

echo = "
($page != "001" || $page != $image_amount}
<br> (line31)

aspdude2004
05-16-2004, 05:40 PM
lol how the hell did i manage them , but the error command thing is not working

firepages
05-16-2004, 06:08 PM
....but the error command thing is not working


try at the very top of your script



<?
error_reporting(E_ALL);
ini_set("display_errors",1);
?>

aspdude2004
05-16-2004, 06:24 PM
am i getting any where?




<html>

<head>
<title></title>
</head>

<body>


<?
error_reporting(E_ALL);
ini_set("display_errors",1);

// change this to the amount of images ;)

$image_amount = 005;
// make this the source for the NEXT icon please include the extension
// eg next.gif
$nex = "something.gif";
// make this the source for the BACK icon please include the extension
// eg back.gif
$bac = "something.gif";

// be careful when editing below this line
$image = $_GET['image'];
// if there is nothing after the .php set it as no 1
if (!$image) {
$image = 001;
}
// print the image
echo "<img src='ntsk".$image.".gif'>";
// print the nexts etc
echo "Image ".$image." out of ".$image_amount;
if ($page != "001" or $page != $image_amount) {

echo "<br>";

$image_new = $image++;
$image_old = $image--;
echo "<a href=\"gallery.php?image=".$image_old."\"><img src='".$bac."'></a>";
echo "<a href=\"gallery.php?image=".$image_new."\"><img src='".$nex."'></a>";

} elseif ($page == "001") {
echo "<img src='".$bac."'>";
echo "<a href=\"gallery.php?image=".$image_new."\"><img src='".$nex."'></a>";
} elseif ($page == $image_amount) {
echo "<a href=\"gallery.php?image=".$image_old."\"><img src='".$bac."'></a>";
echo "<img src='".$nex."'>";
}
echo "<hr color=\"dark\" height=\"1\">";





?>

</body>

</html>


I realised that 'echo = ""' was in the previous one god im stupid today, however this script is still not working and the error thing is still failing to work... even though i tried it before the first <html> tag and where it is now !!! Can you help me please



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum