Hello.. Everyone.. I am very new to PHP world.. I have got a lesson to Saving images in folder and paths to database.. I have tried a lot.. I have tried various websites but there has no complete solution! Will you provide me the proper code?
edn_781
0
Newbie Poster
Recommended Answers
Jump to Postcheck out he php manual for file uploads. Nice and simple.
Assume DB connection details already given$dest = "images/" . basename( $_FILES['uploadimg']['name']); if(move_uploaded_file($_FILES['uploadimg']['tmp_name'], $dest)){ $r=mysql_query("INSERT INTO table SET fname='$dest'"); //you could add more info to the query eg from $_POST variables from the upload form //do …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.