sending info to next page ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Visual
Forum Newbie
Posts: 4
Joined: Wed Oct 16, 2002 5:53 am

sending info to next page ?

Post 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)
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
Visual
Forum Newbie
Posts: 4
Joined: Wed Oct 16, 2002 5:53 am

Post by Visual »

twigletmac your a genius m8.. :D

thanks so much :) ..
Post Reply