Greetings, people.

I have the following code to upload an image to a db:

if (isset($imgLogo) && $imgLogo != "none")
        $data = addslashes(fread(fopen($imgLogo, "r"), filesize($imgLogo)));
else
        $data = "";

Then I just "INSERT INTO table (image) VALUES $data" but I think that the string that 
contains the image gets truncated somehow. Can anybody tell me why? Is the 
"addslashes" really needed? I'm using php 4.2.1.

Thanks in advance.
--
Un gran saludo/Big regards...
   Arturo Barajas, Tech Support Supervisor
   IT PPG México
   (427) 271-9918, x448


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

Reply via email to