Hope that You can help me, Thanks in advanced !!!
I hv managed to store html file with images as binary type "longblob" into database. Then , i can view the html files with images even after i have deleted the physical location of html file. For security purpose, i need to delete the physical location of html file & images. But , the problem is if the html files contain images, it will only show a broken image link with blank rectangular after i hv deleted the physical location of images files. How can I store the images into the database ?
this is my code to add files into database:
$form_data = "C:\Program Files\Apache Group\Apache\htdocs\index.html";
$data = addslashes(fread(fopen($form_data, "rb"), filesize($form_data)));
$q = "INSERT INTO binary_data (bin_data) VALUES ('$data') ";
this is the code to retrive files from database:
set_magic_quotes_runtime(0);
$data = @MYSQL_RESULT($result,0,"bin_data");
$type = @MYSQL_RESULT($result,0,"filetype");
$data = stripslashes($data);
$data = stripslashes($data);
echo $data;
Thanks in advanced !!!