Could anyone help me with code for a simple PDF file uploader in PHP I want to upload to a file on a server. Ive tried to write one several times and I simply can't get it to work!
jonlloydd
0
Jon
Recommended Answers
Jump to PostAre you sure that you're uploading to the right directory? ../_cms/upload_pdf2.php
So the form is not sending to itself? Is this php code in the same page as the form? Confused.
Can you show your directory structure and where the relevant files are? Thanks
Jump to PostYes of course. When you do the upload routine it depends what happens thereafter.
If the upload routine redirects to a new page after successful upload, the easiest way would be to store the filename in a session variable.$path = '../pdf'; if(empty($errors)==true){ move_uploaded_file($file_tmp,$path.$file_name); //echo "Success"; $_SESSION['last_upload'] …
All 7 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.