For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > March 2007 > echo









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author echo
elk dolk

2007-03-28, 3:58 am


I am storing just the name of photos in the database and the photos are in /img folder ,
and there is no permissions issue. My testing server is IIS And the path would be
something like this : Inetpub\wwwroot\album\img
as I am running out of time! could someone complete this code just with one echo and img src so that I can retrive my photos ?

MySQL columns : photoID=seq number
photoFileName=name of my photo like 3sw.jpg
title=title
description=short description


<?php

$link = mysql_connect('localhost', 'root', 'pw');
if (!$link) {
die('Not connected : ' . mysql_error());
}

$db_selected = mysql_select_db('album', $link);

$query = "SELECT * FROM photo";
$result=mysql_query($query);

while ($row = mysql_fetch_array($result))
{
////echo???

}

mysql_free_result($result);

?>

---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com