Hi. I uploaded my file to a directory and the filename is saved in MySQL database, how do I view my file? My code not viewing but displays just file name.
ps: the file is in html and PDF format.
<?php
mysql_connect("localhost", "user", "paswod") or die(mysql_error());
mysql_select_db("db_name") or die(mysql_error());
$data = mysql_query("SELECT file_name FROM client_file WHERE username = 'john'") or die(mysql_error());
//Puts it into an array
while($info = mysql_fetch_array( $data ))
{
//Outputs the page
Echo "<b>File Name:</b> ".$info['file_name'] . "<br> ";
}
?>