idiot problem with mysql/php
| From: | Andres Baravalle | Date: | Sat, 22 Jul 2000 16:47:49 +0000 |
| Subject: | idiot problem with mysql/php | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-1247@lists.php.net to get a copy of this message | ||
Hi,
I have to put (and get) some images from a database in mysql. Evrithing works fine in my internet database, but not in my local machine (I run a iis server, php, mysql).
The images are not stored well in the database (the table is identical to the table I have in my internet mysql database).
That's the code I used to store the images:
MYSQL_CONNECT( "localhost", "****", "****");
mysql_select_db( "*****");
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$result=MYSQL_QUERY( "INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) ".
"VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data_type')");
MYSQL_CLOSE();
Any ideas?
Thanks in advance,
Andres Baravalle
By the way: I have some cookies that are not read in my local computer, but are read in my web site. Any suggestion? If I connect to internet, work well even in the local copy of my web site.
____________
Andres Baravalle
mailto:andres@baravalle.co.uk
http://www.baravalle.co.uk
tel: +39 015 20511
cell: +39 0328 6754092
fax: +39 02 700431996
____________
I direttori passano, i ficus restano. Quale
carriera è più felice, più vicina ai vertici
aziendali e nel contempo priva di rischi e
responsabilità?
' Voglio essere un ficus' disse il mánagero con
gli occhi lucidi.
Stefano Benni