954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Images Thumbs not showing

Dear respected senior php web developer i m new to php webdeveloping and hoping for a good coder one day inshaALLAH
SIR i have problem with my image hosting script
http://pashtoaudio.com/tahir/upload.php is for uploading images
and http://pashtoaudio.com/tahir/photos.php is for displaying all uploaded images how ever i want to show there small thumbs i put everything correct in tag but still my images thumbs not loading pelase help me thanks!
i m giving my exact code for showing images thumbs here is the code.

<html>
    <head>
        <title>PHP Photo Hosting Script</title>
        <link rel="stylesheet" type="text/css" href="main.css" />
    </head>
    <body>

<?php
include "conn.php";
echo "<center>";
include "head_menu.php";
echo "</center>";

?>
<div class="images_boundry">
<?php $result = mysql_query("SELECT * FROM imgs_name ");
while($images = mysql_fetch_array($result))
{
    $show_img = $images['img_name'];
    echo "<div class='images_thumb'><a href='http://pashtoaudio.com/tahir_upload/".$show_img."'><img scr='tahir_upload/".$show_img."'></img></a></div>";
}

?>
<div style="clear:both"></div>
</div>
    </body>
</html>
tahirkhanafridi
Newbie Poster
20 posts since Dec 2011
Reputation Points: 14
Solved Threads: 0
 

Change line 20 to this:

echo "<div class='images_thumb'><a href='http://pashtoaudio.com/tahir_upload/".$show_img."'><img src='/tahir_upload/".$show_img."'></img></a></div>";

Note the / in front of your image source, and it should be src (not scr).

pritaeas
Posting Expert
Moderator
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

Also, you should not be using an closing tag - there is no such thing. It should be:

echo "<div class='images_thumb'><a href='http://pashtoaudio.com/tahir_upload/".$show_img."'><img src='/tahir_upload/".$show_img."' /></a></div>";
simplypixie
Posting Pro in Training
447 posts since Oct 2010
Reputation Points: 116
Solved Threads: 82
 

Urgh. Tidy up your deprecated and dodgy HTML before you start messing with php.

<center>


No need for this - use CSS

<div style="clear:both"></div>


Although not wrong, should be dealt with in CSS. However, why is it empty? Markup like this should be avoided where possible.

Simply has already noted the mistake with the tag.

Also you have no doctype declared, e.g. for HTML5:

<!DOCTYPE html>


A missing DTD may trigger quirksmode in some browsers.

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,796 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

Thanks every body for your good replies i like that fast resolution for my problem. i took very big mistakes in little tags i learned a lot and get that if i don't think about small things i can't be grow up in programming field. once more time thanks for all supporters see you next time with new issues inshALLAH

tahirkhanafridi
Newbie Poster
20 posts since Dec 2011
Reputation Points: 14
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: