I inserted the mysql_query() below[snip]
but it still doesn't upload the file nor does it throw an error.
// Create the SQL query. $sql = "INSERT INTO binary_data SET filename = '$uploadname', filetype = '$uploadtype', description = '$uploaddesc', bin_data = '$filedata'";
$ok = @mysql_query($sql);
if(!$ok)die('Database error storing the file:'.mysql_error());
$id= mysql_insert_id();
print "<p>This file has the following Database ID: <b>$id</b>"; echo "<br>"; echo "<a href=\"getdata.php?id=$id\">Click to view file</a>"; MYSQL_CLOSE();
So what's the output? How do you know it's not working? If you're not getting an error, then your query is running and something is going in the database. Are you sure the problem isn't in how you're displaying the data?
-- ---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php