Jump to content

Simple problem driving me crazy


deansaddigh

Recommended Posts

Hi if you go here http://www.languageschoolsuk.com/student_photos.php?page=1

I have the most annoying problem, you can see little "-" that links to the last image and its driving me nuts. please help.

 

code where im printing out images

 

while($row = mysql_fetch_array ($result))
			{
				$imagename = $row ['name'];
				$image = 'Admin/'.$row['path'] . '/' . $row ['name'];

                    //echo '<img src="'.$image.'"/ >';
				//echo'<a href="'.$image.'" rel="lightbox" title="my caption">image </a>';
				echo '<a href="'.$image.'" rel="lightbox" class="studentimage"><img src="'.$image.'" width="150" height="150"/>';
			}
               echo '<br />';

Link to comment
https://forums.phpfreaks.com/topic/198853-simple-problem-driving-me-crazy/
Share on other sites

Perhaps try...

 

while($row = mysql_fetch_array ($result)){
$imagename = $row ['name'];
$image = 'Admin/'.$row['path'] . '/' . $row ['name'];
?>
<a href="<?PHP echo $image; ?>" rel="lightbox" class="studentimage"><img src="<?PHP echo.$image; ?> width="150" height="150"><a/>
<?PHP
}
echo '<br />';

First of all you forgot to close those <a> tags so you wanna close them:

while($row = mysql_fetch_array ($result))
            {
               $imagename = $row ['name'];
               $image = 'Admin/'.$row['path'] . '/' . $row ['name'];
               
                    //echo '<img src="'.$image.'"/ >';
               //echo'<a href="'.$image.'" rel="lightbox" title="my caption">image </a>';
               echo '<a href="'.$image.'" rel="lightbox" class="studentimage"><img src="'.$image.'" width="150" height="150"/></a>';
            }
               echo '<br />';

then just find what's printing out the - and remove it and you're done!

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.