How to retrive uploaded files using php
Hello Php Gurus
I am still finding my way around php.
i need to retrieve a file uploaded to my server with its path linked to a database.I am seeing every other thing except for the file uploader by that user.please can someone show me how to put the code for the link on this file for a user to show on the html output?Thank you this is the array
@$upload_Name = $_FILES['FILE']['name'];
@$upload_Size = $_FILES['FILE']['size'];
@$upload_Temp = $_FILES['FILE']['tmp_name'];
@$upload_Mime_Type = $_FILES['FILE']['type'];
@move_uploaded_file( $upload_Temp , $uploadFile);
$upload_URL = "uploads/".$upload_Name ;
//Writes the information to the database
mysql_connect("localhost", "p_o", "hello") or die(mysql_error());
mysql_select_db("p_profile") or die(mysql_error());
mysql_query("INSERT INTO `users_cv` VALUES ('$id', '$name', '$from', '$gender', '$address', '$upload_Name')");
Is it the file-uploader (i.e username) or the file that was uploaded?
Originally Posted by sperox
The file that was uploaded
Everything works except the file isn't uploaded, is that correct?
To me it looks like something is missing, but you may have that somewhere in your code (unless this is all)
(I am also fairly green on this, I have only been working with PHP for a bit more than a year)
Is there a chance I can see the entire code for this submit form?
This may be useful for you, a thread for image upload.
Should be easy to adjust to a file upload, or use it as reference
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)