Jump to content

show/hide


searls03

Recommended Posts

Ok this is a jquery/php question.  What I have is a code that shows images from a database. 

<div class="imagewrapper">
<form action="upload.php" method="post">
<?php $sql = mysql_query("SELECT id, link FROM products WHERE id>='$basenumber' limit 8");
while($row = mysql_fetch_array($sql)){
$imageid = $row['id'];	
$image2 = $row['link'];
?>

<div class="imageholder"><div id="apDiv<?php echo $imageid;?>"><img src="<?php echo $image2;?>
" width="300"  /></div>

</div>
<?php } ?>

 

What I want is to use a jquery code similar to this site: http://papermashup.com/jquery-show-hide-plugin/.

 

I need the code to be inside of loop like the image displaying is.  I want entries for photos to pop up if I want to upload a new image in the place of the one that was there, but I have to click the link to show the form though.  do you think you can help?

Link to comment
https://forums.phpfreaks.com/topic/253401-showhide/
Share on other sites

no, not quite.  what I would like is so that the images will show, but there is a link underneath of them that will say "change", and then a form will appear and the picture will disappear and then I can upload a new image, the only problem is that these are in loops, so it will be the same code repeating over and over for each picture, but I want to make sure that only the picture I want to change has a form appear over it..  does this make more sense?

Link to comment
https://forums.phpfreaks.com/topic/253401-showhide/#findComment-1300086
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.