Hallo everyone!
I wont to add php/html code which can do that:
Let the user choose and upload a file (an image), save the file on the server and store its location into a mysql table.
If you have an example code or a link that would be super!
I know how to handle the html part but I have no idea whatsoever what to do with the path I get from the user!
Please help me.
Thanks.
How to upload an image, save it on the server and store its?
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
The information is stored in $_FILES["your-form-field-name"] once the file has been uploaded.
Use move_uploaded_file() to move it where you want, then add that to the DB.
http://uk.php.net/manual/en/features.file-upload.php
Use move_uploaded_file() to move it where you want, then add that to the DB.
http://uk.php.net/manual/en/features.file-upload.php