Lisa23 Posted September 11, 2010 Share Posted September 11, 2010 Hi i have this while fetch query which brings up a images from the database but know i tried to add a delete link in each image so i add a delete hyperlink inside the query but instead counts the link as if it was a image too. like if i have 5 images it will double to 10 because of the delete hyeprlink why is this happen help please <?php define('ROOT_DIR', './'); define('PROPER', TRUE); /** * include common files */ include_once(ROOT_DIR. 'includes/common.inc.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <link href="css_eurico/lightbox.css" rel="stylesheet" type="text/css" /> <link href="css_eurico/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css" media="screen" /> <script type="text/javascript" src="js_eurico/jquery.js"></script> <script type="text/javascript" src="js_eurico/jquery.lightbox-0.5.min.js"></script> <script type="text/javascript"> $(function() { $('#gallery a').lightBox(); }); </script> </head> <body> <?php $album_id = $_GET['albums']; $photo = mysql_query("SELECT * FROM photos WHERE album_id='$album_id'"); echo '<div id="menu">'; while ($row = mysql_fetch_assoc($photo)) { echo '<div id="gallery">'; echo'<div class="Image">'; echo '<a href=photos/thumbs/'. $row['photo_proper'] . ' "><img class="picture" src="photos/' . $row['photo_proper'] . ' " width="100" height="100 " /></a>'; echo '<h4 class="brand">' . $row['photo_name'] . '</h4>'; echo '</div>'; echo '<a href="index.php">alo</a>'; } ?> </div> </div> </body> </html> Link to comment https://forums.phpfreaks.com/topic/213120-mysql-fetch-doubles-the-ammount-when-insert-an-hyperlink/ Share on other sites More sharing options...
Lisa23 Posted September 11, 2010 Author Share Posted September 11, 2010 how can i get the while fetch to stay inside the gallery div and the delete link outside the div gallery but inside the while fetch?? Link to comment https://forums.phpfreaks.com/topic/213120-mysql-fetch-doubles-the-ammount-when-insert-an-hyperlink/#findComment-1109870 Share on other sites More sharing options...
Lisa23 Posted September 14, 2010 Author Share Posted September 14, 2010 HELP PLEASE Link to comment https://forums.phpfreaks.com/topic/213120-mysql-fetch-doubles-the-ammount-when-insert-an-hyperlink/#findComment-1111052 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.