here is the code but i am not sure what is going wrong?
<?
$comic = $HTTP_GET_VARS["comic"];
$file = 'Ep' . $comic . '.jpg';
$path = 'Image/'; //the path to your images directory, must have the trailing slash
$latest = '00002'; //change the number on this when you make a new comic
if (!isset($comic)) {
$comic = $latest;
?>
<img src="<?php echo $path . 'Ep' . $latest . '.jpg'; ?>" alt="The latest comic">
<?php //
}
//else if (file_exists($path . $file)) {
else if (fopen($path . $file, "r")) {
?>
<img src="<?php echo $path . $file; ?>" alt="Comic Number <?php echo $comic; ?>">
<?php
}
else {
?><img src=ComicError.png><br><?php
echo('AAAAAAAAAAAAA what did you do!!! i cant find the ep your looking for???'); ?><br><?php
echo($file . ' does not exist'); ?><br><?php
echo('other information'); ?><br><?php
echo('comic = ' . $comic); ?><br><?php
echo('file = ' . $file); ?><br><?php
echo('path = ' . $path); ?><br><?php
echo('thanks for taking your time');
}
/*
To go to another comic, the comic number must be increased or decreased. However,
the format of the GET value comic does not allow for the number to simply be 1 or 2.
Instead, the number must be formatted as 00001 or 00002.
*/
$comic_minus = $comic - 1; // Used for the previous comic
$comic_plus = $comic + 1; // Used for the next comic
while ( strlen($comic_minus) < 5 && strlen($comic_plus) < 5){
$comic_minus = "0".$comic_minus;
$comic_plus = "0".$comic_plus;
}
echo "<center>";
if ($comic == $latest){
echo "<a href=\"Ep.php?comic=00001\">First</a> | ";
echo "<a href=\"Ep.php?comic=".$comic_minus."\">Previous</a>";
}
else if ($comic > 1){
echo "<a href=\"Ep.php?comic=".$comic_minus."\">Previous</a> | ";
echo "<a href=\"Ep.php?comic=00001\">First</a> | ";
echo "<a href=\"Ep.php?comic=".$comic_plus."\">Next</a> | ";
echo "<a href=\"Ep.php\">Latest</a>";
}
echo "</center>";
?>