Jump to content

mysql fetch doubles the ammount when insert an hyperlink


Lisa23

Recommended Posts

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>

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.