Thank you Mike once more you are correct. One more thing. Now the file is saved in a Blob field at the database. But when I show the blob field the image doesnīt appear. Just a collection of characaters. I have to save the Blob field in a file. How can I do that? Thank you very much.
----- Original Message ----- From: "Mike Flynn" <[EMAIL PROTECTED]> To: "Waldemar Brand Neto" <[EMAIL PROTECTED]> Sent: Monday, April 22, 2002 12:35 PM Subject: Re: [PHP-WIN] Problem with uploading Files with PHP 4.1.2 on IIS > Thanks :). > > You will definitely need the quotes around the $bindata in the > query. You're right that quotes within the binary data can mess up PHP or > MySQL. They won't mess up PHP in this case because they are contained > within a string variable ($bindata), and never directly parsed in the > code. But they could mess up MySQL in the query, where the single quotes > could confuse MySQL. > > However, in the code I gave you: > $thebindata = addslashes(fread(fopen($the_file, "r"), filesize($the_file))); > > You can see it uses the "addslashes" function to work around this > problem. Did you use the addslashes in your code on the $bindata before > the query? Addslashes adds backslashes (\) in front of single and double > quotes, which fixes it for MySQL. Are you using it? > > -Mike > > At 12:14 PM 4/22/2002 -0300, you wrote: > >Dear Myke you are a good programer with trained eyes to find the erros fast. > >I tried with quotes, without and but it not works. > >I Think the problem is the image itself. Inside the Image I have a several > >' and ". This quotes cause problem confusing php. I send an atached file > >with the result. Donīt worry the image is just a test. Do you have any idea? > > > >Thanks, Waldemar > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php