substitute for unclick in php, almost there but having issues

So what I am trying to do is have clicking on a thumbnail do two things at once. Make the larger image go into the iframe on my page and change the caption text to the appropriate caption.

What I tried doing was pass the id to a new page to have come up in an iframe with both the image and the caption.

But in the new page I am having trouble getting the id to transfer. Any suggestions? Here is the url http://rachelhippert.com/test/gallery.php.

The code for the thumbnail is here:
[php] <?php

$results= mysql_query (“SELECT * FROM gallery WHERE remove=0 AND category=1 ORDER BY order DESC”);

while($result= mysql_fetch_array($results)){
echo "

";

}[/php]
?>

And the postImg.php page is like this:

[php]<?php
require(“connect.php”);
$id= $_GET[“id”];

$results= mysql_query (“SELECT * FROM gallery WHERE remove=0 AND category=1 AND WHERE id=$id”);

echo "


“.$result[“caption”].”

";

?>[/php]

I appreciate any help :slight_smile:

Typo in the subject, sorry- ‘substitute for onclick’

Sponsor our Newsletter | Privacy Policy | Terms of Service