Page 1 of 1

sending info to next page ?

Posted: Wed Oct 16, 2002 7:47 am
by Visual
Hello, hope someone can help me (again lol), so i'm close to having this done but am stuck. I've read the sticky at the top of this forum but it's well over my head lol.

What i've got is a image gallery with thumbnails (this bit working fine), what i need it to do is once i click on a thumbnail is for it to open in showpic.php. I'm not quite sure how to tell showpic.php to display the pic clicked on. But below is the code i've made. it's not right :( ..but i ain't sure where i'm going wrong.

Code: Select all

$ctime = filectime("$dir/$a_imgї$x]");
    if("$dir/$a_imgї$x]" !="")
     print "<td align=center><a href=./showpic.php?$a_imgї$x]=$image" target="_self"><img src="$dir/$a_imgї$x]" height=$height width=$width border=0></a></td>\n";
   }
   if(($x%$col) == ($col-1))
   {
    print "</tr>\n";
    $r++;
   }
in showpic.php i've got this where i want the image to show.

Code: Select all

<?php
echo("<p align="center">$image</p>");
?>
hope someone can help and tell me where i've gone wrong :)


Thanks again

Visual (Newbie PHPer)

Posted: Wed Oct 16, 2002 7:55 am
by twigletmac
To start try changing this:

Code: Select all

print "<td align=center><a href=./showpic.php?$a_imgї$x]=$image" target="_self"><img src="$dir/$a_imgї$x]" height=$height width=$width border=0></a></td>\n";
to this:

Code: Select all

print '<td align="center"><a href="./showpic.php?image='.$a_imgї$x].'" target="_self"><img src="'.$dir.'/'.$a_imgї$x].'" height="'.$height.'" width="'.$width.'" border="0"></a></td>';
and then this:

Code: Select all

echo("<p align="center">$image</p>");
to this:

Code: Select all

echo '<p align="center">'.$_GETї'image'].'</p>';
Mac

Posted: Wed Oct 16, 2002 7:58 am
by Visual
twigletmac your a genius m8.. :D

thanks so much :) ..