if you view the source of the generated page, is the image name correct? is the path to the image correct?

bastien


From: elk dolk <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] echo Date: Tue, 27 Mar 2007 22:07:37 -0700 (PDT)

Hi all,
I am new to web programming.

I have code to add pictures to a MYSQL database. Now I can't seem to figure out how to get them back out ! so we can see them. The MySQL doesn't seem to be a problem (yet), also I'm trying to learn PHP.

What I usually do is to load the images in a folder "img" and then the name of the pic (i.e. "myphoto.jpg") in the database, so i retrieve the name of the pic with:

     Code:     <?php
 $connex = MySQL_connect(server,login,password);
 $sql_query = "select picname from photos where...";
 $result = MySQL_query($sql_query,$connex);
 $row = MySQL_fetch_array($result);
 ?>

 and then:

     Code:     echo "<img src=".$row['photoFileName']." alt='photo'>";

  but I can't see the photo
Any pointers or code samples will be greatly appreciated...


---------------------------------
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.

_________________________________________________________________
RealLiveMoms: Share your experience with Real Live Moms just like you http://www.reallivemoms.ca/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to