Page 2 of 2

Posted: Fri Jul 02, 2004 7:43 pm
by markl999
If you have access to your php.ini then turn both magic_quotes_gpc and magic_quotes_runtime Off and restart the webserver. If not you could use a .htaccess
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0

Posted: Fri Jul 02, 2004 7:46 pm
by WelshApple
WaldoMonster wrote:Now it must be working.

Code: Select all

<?php
$link = mysql_connect('localhost', 'USERNAME', 'PASSWORD'); 
mysql_select_db('DATABASE'); 
$query = "SELECT image FROM test WHERE id='1'"; 
$result = mysql_query($query); // removed $link 
header('Content-type: image/jpeg'); 
list($data) = mysql_fetch_row($result); 
print $data;
mysql_close($link); // close connection
?>
It is also posible to use mysql_pconnect() instead of mysql_connect().
Then you don't have to close the connection.
Yey :-) That's the ticket!

Thanks a million!

Posted: Fri Jul 02, 2004 7:55 pm
by WaldoMonster
I hope it is still working.
You have replayed before I finessed editing.
Take a look back if this is also working. :roll:
WelshApple wrote:
WaldoMonster wrote:Now it must be working.

Code: Select all

<?php
$link = mysql_connect('localhost', 'USERNAME', 'PASSWORD'); 
mysql_select_db('DATABASE'); 
$query = "SELECT image FROM test WHERE id='1'"; 
$result = mysql_query($query); // removed $link 
header('Content-type: image/jpeg'); 
list($data) = mysql_fetch_row($result); 
print $data;
mysql_close($link); // close connection
?>
It is also posible to use mysql_pconnect() instead of mysql_connect().
Then you don't have to close the connection.
Yey :-) That's the ticket!

Thanks a million!