Hi Atli's,
Great tutorial just wondering could it be possible to demonstrate how to delete files within the list_files.php as I have tried and Dormilich has help me but still could not understand what I am doing wrong.
As I have stated in my post I am a self learning PHP and MYSQL and would love to see a guide from you on this so that I can learn from it and compare my code as well.
thanks
User Profile
Collapse
-
Hi again,
I was looking at the list-files.php and I was wondering that the headers bring the data forward could i then use "unlink" to remove the file from the database or I did not understand the download phase.Leave a comment:
-
-
Hi,
what I had done is that I made an error on the extension now corrected.
what I want to achieve is that from Atli's post he had done:
form - to upload file
add_file.php - that adds the file to the database
list_files.php - to view the list of files and to download the file
get_file.php - is to gather the data shown in list_files.php
what I want to do is also to include in...Leave a comment:
-
Hi,
I am still having the same problem and there is no error detected as far as my friend and has found out for me.
I don't want to be a burden but could you provide the code with comments so that I can understand it and also see where I went wrong please
e.g. I have notice that in line nine I left out the "i" in "mysql_quer y" however I though this will be the same way as the get_file.php...Leave a comment:
-
in line two I added have my details and connects to the database, in line nine it executes the query? and finally, how do i enable reporting/display as I am using dreamweaver CS5.5 and PHPMYADMINLeave a comment:
-
Hi again,
I already have linked the delete_file.php to the list_files.php
as for the delete page the code I have done is this:
Code:<?php $dbLink = new mysqli('', '', '', ''); if(mysqli_connect_errno()) { die("MySQL connection failed: ". mysqli_connect_error()); } $query = "DELETE FROM file WHERE id = ('$id')"; $result = mysql_query($query);
Last edited by Dormilich; Mar 15 '12, 01:40 PM. Reason: Please use [CODE] [/CODE] tags when posting code.Leave a comment:
-
Hi Dormilich,
Sorry is PK the primary key?
how would I go about this as I was thinking to create the delete file that is linked in the list_files.php so that when open I can then view the files that I want to download or delete.
thanks for the replyLeave a comment:
-
Removing files into a MySQL database using PHP
Hi,
First off I am self learning PHP and MYSQL, which I saw your guide on "Uploading files into a MySQL database using PHP" and this was great guide and responses that had came through.
My question is how do I now remove files from the guide that you have created above,
thanks
No activity results to display
Show More
Leave a comment: