File upload working but how do I save path to a DB

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

Post Reply
lostprophetsie
Forum Newbie
Posts: 2
Joined: Mon Jan 14, 2008 5:02 am

File upload working but how do I save path to a DB

Post by lostprophetsie »

Hi I have just added a picture upload feature to a page I am developing I now need the location and name of the image to be saved to a database along with some other information from a form. How can I do this?
User avatar
jimthunderbird
Forum Contributor
Posts: 147
Joined: Tue Jul 04, 2006 3:59 am
Location: San Francisco, CA

Re: File upload working but how do I save path to a DB

Post by jimthunderbird »

The logic I think will be:

if the file is successfully uploaded, store the target file path and other values in $_POST into db, might want to check out:

http://us.php.net/features.file-upload
lostprophetsie
Forum Newbie
Posts: 2
Joined: Mon Jan 14, 2008 5:02 am

Re: File upload working but how do I save path to a DB

Post by lostprophetsie »

Nice I'll have a look at this, thank you.
Post Reply