Hi, can anyone please help me why I got this error every I uploaded files.
Error:
Here is the code on the said warning message:
And because of that error the name and mime of the files I uploaded didn't appear, thats why I cannot properly download the files. Maybe because the mime/filetype is not present.
Your help will be highly appreciated.
Thanks guys..
Error:
Warning: mysql_real_esca pe_string() expects parameter 1 to be string, resource given in c:\Inetpub\wwwr oot\uploadingfi les\add_file.ph p on line 89
Warning: mysql_real_esca pe_string() expects parameter 1 to be string, resource given in c:\Inetpub\wwwr oot\uploadingfi les\add_file.ph p on line 90
Warning: mysql_real_esca pe_string() expects parameter 1 to be string, resource given in c:\Inetpub\wwwr oot\uploadingfi les\add_file.ph p on line 92
Warning: mysql_real_esca pe_string() expects parameter 1 to be string, resource given in c:\Inetpub\wwwr oot\uploadingfi les\add_file.ph p on line 90
Warning: mysql_real_esca pe_string() expects parameter 1 to be string, resource given in c:\Inetpub\wwwr oot\uploadingfi les\add_file.ph p on line 92
Code:
# Gather all required data $name = mysql_real_escape_string($dbLink, $_FILES['uploaded_file']['name']); $mime = mysql_real_escape_string($dbLink, $_FILES['uploaded_file']['type']); $size = $_FILES['uploaded_file']['size']; $data = mysql_real_escape_string($dbLink, file_get_contents($_FILES['uploaded_file']['tmp_name']));
Your help will be highly appreciated.
Thanks guys..
Comment