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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.