Okay, I've got pdf's storing to a mysql table. Now, how do I link to and open (not download, but OPEN)
and view/read them from within our php crm app? and NO, I DON'T want them stored in the file system instead.
The save/upload sciprt is as follows: Please.
<?php
$fileUpload = $_FILES['fileUpload']['tmp_name'];
$fileUpload_name = $_FILES['fileUpload']['name'];
$fileUpload_size = $_FILES['fileUpload']['size'];
$fileUpload_type = $_FILES['fileUpload']['type'];
$fileHandle = fopen($fileUpload, "rb");
$fileContent = fread($fileHandle, $fileUpload_size);
$fileContent = addslashes($fileContent);
$dbQuery = "INSERT INTO pdfs VALUES (0, '$fileUpload_name', '$fileContent', '$fileUpload_type')";
mysql_query($dbQuery) or die("Couldn't add file to database");
if(!mysql_query($dbQuery))
{
print("Insert failed!");
}
else
{
print('File Inserted');
}
?>