Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

image not displaying

images php coding issues or problems here.

Moderators: macek, egami, gesf

image not displaying

Postby vrpvrp » Mon Mar 05, 2012 1:17 am

hi there,
i am trying to save an uploaded image in a folder on the server,and i am storing the path of the image in a database.i successfully done the uploading and storing part..but i am not able to display the image which was in the folder...
here is the code for view.php:
$result=mysql_query("select path from uploadimage");
while($row = mysql_fetch_array($result))
{

header("Content-type: image/jpeg");
echo '<image src=" <? echo $row['path'];?>" alt="image" width="600" height="600">';
}
please help me out!
vrpvrp
New php-forum User
New php-forum User
 
Posts: 10
Joined: Mon Mar 05, 2012 12:54 am

Re: image not displaying

Postby avahaf » Mon Mar 05, 2012 1:25 am

$result=mysql_query("select path from uploadimage");
while($row = mysql_fetch_array($result))
{

echo "<image src=' ".$row['path']."' alt='image' width='600' height='600'>";
}
avahaf
New php-forum User
New php-forum User
 
Posts: 2
Joined: Mon Mar 05, 2012 1:02 am


Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.