RE: [PHP-DB] How to call image from mySql to php file

From: Date: Wed, 21 Feb 2007 15:39:41 +0000
Subject: RE: [PHP-DB] How to call image from mySql to php file
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-43112@lists.php.net to get a copy of this message
Simple, just add the image tag around it $query="SELECT logos FROM table WHERE sno = '$sno'"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $logos=mysql_result($result,$i,"logos"); echo " <div> <p><img src'$logos'> </p> </div>"; Bastien
From: Chris Carter <chandan9sharma@yahoo.com> To: php-db@lists.php.net Subject: [PHP-DB] How to call image from mySql to php file Date: Wed, 21 Feb 2007 03:26:44 -0800 (PST) I have a field in database called "logos" which has one value "images/logos/some_logo.jpg" In my php I am trying to call it in my php file as image. With this code. $sno = $_REQUEST['sno']; $query="SELECT logos FROM table WHERE sno = '$sno'"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $logos=mysql_result($result,$i,"logos"); echo " <div> <p> $logos </p> </div>"; ?></div> But getting errors. What is the way to call image in php file from the database. I know that this is a very basic question but first time for me. I ignored this in the begining but now its right infront of me. Please advice. Chris -- View this message in context: http://www.nabble.com/How-to-call-image-from-mySql-to-php-file-tf3266161.html#a9079259 Sent from the Php - Database mailing list archive at Nabble.com. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ Your Space. Your Friends. Your Stories. Share your world with Windows Live Spaces. http://spaces.live.com/?mkt=en-ca

« previous php.db (#43112) next »