PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
sguy
Forum Commoner
Posts: 61 Joined: Sun Aug 10, 2003 2:44 am
Post
by sguy » Tue Aug 24, 2004 3:38 am
why cannot show the picture using this method?
got another way to do it?
thanks...
Code: Select all
<?
mysql_select_db($dbname, $link);
$result=mysql_query("select * from user_detail where nickname = '$name'") ;
$number_of_array = mysql_num_rows($result);
while ($number_of_array = mysql_fetch_array($result)){
echo"<img src="./image/$number_of_array[image_name]">";
}
?>
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Tue Aug 24, 2004 6:37 am
Try:
Code: Select all
echo '<img src="/image/'.$number_of_array['image_name'].'">';
..presuming your image directory is in your document root. You should also be using mysql_error()
to make sure all is well .
sguy
Forum Commoner
Posts: 61 Joined: Sun Aug 10, 2003 2:44 am
Post
by sguy » Wed Aug 25, 2004 2:02 am
i've tried all the possible ways to do that, but can't....
it just shows this when i check the properties of the picture, without the "william.jpg"
http://localhost/image/
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Wed Aug 25, 2004 2:24 am
Why are you linking to my "pictures" directory!? I thought no one knew about that!! :p
sguy
Forum Commoner
Posts: 61 Joined: Sun Aug 10, 2003 2:44 am
Post
by sguy » Wed Aug 25, 2004 2:37 am
LiLpunkSkateR wrote: Why are you linking to my "pictures" directory!? I thought no one knew about that!! :p
Phenom wrote: your localhost looks alot like mine
rofl.
lol