Php Mysqli So Download
I am creating PHP page that allows users to download files when they click in this button:
Playlist: CRUD with PHP and MySQLi Tutorial 2016 [Part 1] Update Notes 16 June,2016,In these video you can also see How To Insert & Display Data into Mysql. Join Stack Overflow to learn, share knowledge, and build your career. Create and save this script with any file name and a.php extension, like 'mysql_test.php,' in the www directory, which is the same location as the phpinfo.php script from above. If you click on Run script in the PHP drop down, you'll see the output of the script in the output window. Will install package containing both old one and the new one, so afterwards all you need to do is to add extension=mysqli.so in your php.ini, restart apache and it should work.
then the page redirect to download.php, code:
Look for the file set up in the directory you have chosen in the previous step. Download driver printer hp deskjet 3920 untuk windows 7.
however, wehn i click in download i always get the massage of the last else statement 'error no id was passed', but i can't find the problem, is the problem that i made the primary key of the file is the name??
Samer El GendySamer El GendyMysqli Php Example
4 Answers
If your link looks like this:
Then the GET
variable will be 'id' as in $_GET['id']
and not$_GET['file_name']
u should use <a href='download.php?id=<?= $row['file_name'];?>'>
then use $_GET['id']
since id is the variable u pass in url not $_GET['file_name']