Go4Expert (http://www.go4expert.com/)
-   Web Design, HTML And CSS Forums (http://www.go4expert.com/forums/web-design-forum/)
-   -   image links not working (http://www.go4expert.com/forums/image-links-t11799/)

boygenius 3Jul2008 00:17

image links not working
i have created an image gallery using php.
everything if fine except that the links to the full images are not working.
the thumbnails are linked to the full image , however this does not work as expected.

shabbir 3Jul2008 09:00

Re: image links not working
Your images are linked to gallery.php?album_name=illusions&max=10 and so they don't show complete images when gallery.php shows with the above parameter

boygenius 3Jul2008 12:52

Re: image links not working
i changed the links of some of the images to absolute ones(see gallery illusion) , but even that did not work.
the problem seems to be something else as when i put a "image" link on that page to one of the images it worked fine,but the thumbnails do not link.
one more thing i would like to add is that the links work fine in IE6 and OPERA but not in firefox and safari

shabbir 3Jul2008 12:57

Re: image links not working
There is definitely some problem in your code and if you share that we may be able to help

boygenius 3Jul2008 17:43

Re: image links not working
here's the portion of the code(gallery.php) that generates the images and links

PHP Code:

$_GET['pic_num'])) $_GET['pic_num']=0;
"Failed to connect to database".mysql_error());
// for previous        
$query="SELECT pic_num,pic_name,pic_thumb,pic_full,pic_size,pic_desc FROM wizkid_mysite.gallery_$album_name where pic_num > '$pic_num'";
//          echo"\n<br/>pic_num = $pic_num <br/>$query";
"\n<div class=\"gallery\"><ul>";
"<br/>table ".mysql_error());
                \n<a href=\"
                \n<img src=\"
$row[2]\" width=\"100px\" height=\"100px\" alt=\"$row[5]\"/>
                \n</li> "
//         if(!($row=mysql_fetch_row(($query_result)))&&$i++<9)
"\n<li style=\"visibility:hidden;\"><a><img></a></li>";    
// for  next
//    echo"<br/>for_next= $for_next max=$max<br/>";
"\n<br/><p class=\"album_nav\">
             \n<a href=\""
.$previous."\">previous</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<a href=\"".$next."\">next</a>             
            \n<a href=\""
.htmlentities($_SERVER['PHP_SELF'])."\">Change ALbum</a>

shabbir 3Jul2008 20:25

Re: image links not working
There are lots of error like <a><img></a>

You should see how to display the image

Apart from that code you don't have the img tag to display full image

All times are GMT +5.5. The time now is 11:40.