[SOLVED] Submitting a file to another page via a form...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yeah.. should be able to just unlink the final destination..
jonas
Forum Commoner
Posts: 96
Joined: Sun May 23, 2004 9:25 pm

Post by jonas »

Code: Select all

<?php 

unlink($_FILES['http://www.bolt3.com/faqs/dvdlist.txt']);

?>
So I tried this, but it doesnt delete the file out of the faqs folder on the FTP... did I write it properly
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you should probably use the localized path you used during the copy/move_uploaded_file calls...
jonas
Forum Commoner
Posts: 96
Joined: Sun May 23, 2004 9:25 pm

Post by jonas »

This is after though. Like the user is gone, they submitted the file and submission information to the DB and it's waiting to be approved (in the DB). The file is on the server.

But now the admin sees it's crap and wants to delete it via backend, so they hit delete and I want it to delete the file out of the folder.
jonas
Forum Commoner
Posts: 96
Joined: Sun May 23, 2004 9:25 pm

Post by jonas »

Also the url in $_FILES is actually $faq_url gotten from the submission in the DB.
jonas
Forum Commoner
Posts: 96
Joined: Sun May 23, 2004 9:25 pm

Post by jonas »

I used php.net and figured it out myself. Thanks for all the help!

Finished this section almost now :)


Now the forums. dun dun dun!
Post Reply