echo

echo

am 29.03.2007 14:08:36 von elk dolk

--0-877037446-1175170116=:64220
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


thanks to Chris and Dimiter,
I think I am close but still the problem is not solved, when I add

echo "
to the code as it was sugested by Dimiter there is parse Error :

PHP Parse error: syntax error, unexpected $end in C:\Inetpub\wwwroot\album\show.php on line 44

line 44 is end of the code just after

what does it mean?


>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
>----------------------------------------------------------- ------




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

$db_selected = mysql_select_db('album', $link);
if (!$db_selected) {
die ('Can\'t use foo : ' . mysql_error());
}


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


while ($row = mysql_fetch_array($result))
{
echo "
}


mysql_free_result($result);
?>







---------------------------------
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
--0-877037446-1175170116=:64220--

Re: echo

am 29.03.2007 14:15:29 von Brad Bonkoski

elk dolk wrote:
> thanks to Chris and Dimiter,
> I think I am close but still the problem is not solved, when I add
>
> echo "
> to the code as it was sugested by Dimiter there is parse Error :
>
> PHP Parse error: syntax error, unexpected $end in C:\Inetpub\wwwroot\album\show.php on line 44
>
> line 44 is end of the code just after
>
> what does it mean?
>
probably you don't have a semi colon at the end of your echo line....
nor is there and end double quote.

>
>
>> 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
>> ------------------------------------------------------------ -----
>>
>
>
>
> >
> $link = mysql_connect('localhost', 'root', 'pw');
> if (!$link) {
> die('Not connected : ' . mysql_error());
> }
> echo 'connected!';
>
> $db_selected = mysql_select_db('album', $link);
> if (!$db_selected) {
> die ('Can\'t use foo : ' . mysql_error());
> }
>
>
> $query = "SELECT * FROM photo";
> $result=mysql_query($query);
>
>
> while ($row = mysql_fetch_array($result))
> {
> echo "
> }
>
>
> mysql_free_result($result);
> ?>
>
>
>
>
>
>
>
> ---------------------------------
> Looking for earth-friendly autos?
> Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
>

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

RE: echo

am 29.03.2007 14:58:27 von Bastien Koert

try

echo " ";

warpping the array element in braces allows for proper evaluation

bastien

>From: elk dolk
>To: php-db@lists.php.net
>Subject: [PHP-DB] echo
>Date: Thu, 29 Mar 2007 05:08:36 -0700 (PDT)
>
>
>thanks to Chris and Dimiter,
>I think I am close but still the problem is not solved, when I add
>
>echo "
>to the code as it was sugested by Dimiter there is parse Error :
>
>PHP Parse error: syntax error, unexpected $end in
>C:\Inetpub\wwwroot\album\show.php on line 44
>
>line 44 is end of the code just after
>
>what does it mean?
>
>
> >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
> >----------------------------------------------------------- ------
>
>
>
> >
>$link = mysql_connect('localhost', 'root', 'pw');
>if (!$link) {
> die('Not connected : ' . mysql_error());
>}
> echo 'connected!';
>
>$db_selected = mysql_select_db('album', $link);
>if (!$db_selected) {
> die ('Can\'t use foo : ' . mysql_error());
>}
>
>
>$query = "SELECT * FROM photo";
>$result=mysql_query($query);
>
>
>while ($row = mysql_fetch_array($result))
>{
> echo "
>}
>
>
>mysql_free_result($result);
>?>
>
>
>
>
>
>
>
>---------------------------------
>Looking for earth-friendly autos?
> Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.

____________________________________________________________ _____
Fine Dining & Fancy Food. Check Out This Collection Of Good Eats.
http://local.live.com/?mkt=en-ca/?v=2&cid=A6D6BDB4586E357F!3 78

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