The file description is showing up, but nothing else.
This is what I have right now in my File_2.php....
$fileName = $_POST['fileName'];
$fileSize = $_POST['fileSize'];
$fileDescription = $_POST['fileDescription'];
$fileType = $_POST['fileType'];
$fileUpload = $_POST['fileUpload'];
echo $_POST['fileDescription'];
//echo $fileName;
//echo $_POST['fileType'];
//echo $_POST['fileSize'];
echo $_POST['fileUpload']; //HTTP_GET_VARS['fileUpload']; //$HTTP_POST_VARS['fileUpload'];
// Making sure both the file's location and description have been entered
if(empty($fileDescription))
die("You didn't put the file description.");
elseif($fileUpload == "none")
die("You haven't selected any files.");
// uploaded file from the local directory on the web server, and read its contents
$fileHandle = fopen($fileUpload, "r");
$fileContent = fread($fileHandle, $fileSize);
$fileContent = addslashes($fileContent);
// Database connection set up
$dbServer = "*****.***.***.***";
$username = "*****";
$password = "****";
$database = "*****";
// connect the database using PHP's built-in MySQL functions
$mysql_access = mysql_connect($dbServer, $username, $password);
@mysql_select_db($database) or die( "Unable to connect to the database");
//inserting values to the table
mysql_query("INSERT INTO ImageBLOB (imageID, imageDescription, imageData, imageType) VALUES (0, '$fileDescription', '$fileContent', '$fileType')");
mysql_query($dbQuery) or die("Couldn't add the file to database");
mysql_close($mysql_access);
seems like after trying to upload a file with description, I can connect to my database. However, when I am trying to INSERT those info to my ImageBLOB table, I get the "Couldn't add the file to database" error message. Yet, if i do the "SELECT * FROM ImageBLOB" I see that this command added one entry to the table without "imageData" & "imageType"
any suggestions please? Thank you!!