Re: Query failed:
Here is the code and the error says, Query Failed
PLZ Helllllp
<?
if(isset($_POST['upload']))
{
$fileName = $_FILES['userfile']['name'];
$tmpName = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['content'];
$fp = fopen($tmpName, 'r');
$content = fread($fp, $fileSize);
$content = addslashes($content);
fclose($fp);
if(!get_magic_quotes_gpc())
{
$fileName = addslashes($fileName);
}
include 'library/config.php';
include 'library/opendb.php';
$query = "INSERT INTO files ('name, size, type, content') ".
"VALUES ('$fileName', '$fileSize', '$fileType', '$content')";
mysqli_query($mysqli, $query) or die('Error, query failed');
include 'library/closedb.php';
echo "<br>File $fileName uploaded<br>";
}
?>
Subject
Views
Written By
Posted
11790
September 05, 2005 07:25AM
5973
September 05, 2005 08:51AM
5186
September 06, 2005 02:12AM
Re: Query failed:
10163
September 08, 2005 06:04AM
3516
September 08, 2005 07:16AM
3097
September 09, 2005 06:10AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.