Hi everyone 

I changed the code a bit. Using the file tmp now.

Here's the code and the error (still error but less) 

Thanks for the help


echo $_POST['userfile']['tmp'];
if (is_uploaded_file($_POST['userfile'])) 
   copy($userfile, $HTTP_POST_FILES['userfile']['name']);
else  echo "error. File: $userfile."; 

$fd = fopen ($_FILES["userfile"]["tmp_name"], "rb");
$contents = fread ($fd, filesize($filename));
// Connecting, selecting database
$link = mysql_connect("localhost", "","");
// Performing SQL query; assuming that the "picture" is a BLOB field
$query = "UPDATE studentpart SET pic='$escaped_contents' WHERE loginname='lulu'";
$result = mysql_query($query)
   or die("Query failed");
// Closing connection

error code 
error. File: /tmp/phpObl8LE.
Warning: filesize() [function.filesize]: Stat failed for b_about.gif (errno=2 - No 
such file or directory) in /home/bus8646/www/tryout/upload.php on line 10

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in 
/home/bus8646/www/tryout/upload.php on line 15
Query failed

Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!

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

Reply via email to