Jump to content

Database path store...


Immortal55

Recommended Posts

Alright, how in the world can I do this:

uploadforms.php - A form where you simply input a title, choose a file to upload, add a comment for the file, and select a catagory for the file. All of this info is then passed onto upload.php

upload.php - this takes the info from the forms puts it in a database, I know how to get all the text into the database, but how can i store the file location of the file in the DB (the location of the file on the server)? I cannot seem to get this, and I have been at it for weeks....
Link to comment
https://forums.phpfreaks.com/topic/6242-database-path-store/
Share on other sites

When you upload a file it is put in a temporary location on the server. It is then up to to move this file (move_uploaded_file() ) to wherever to want to store it, renaming as required.

Having defined the path to where you want to store it, store that path in database. It's completely under your control.
Link to comment
https://forums.phpfreaks.com/topic/6242-database-path-store/#findComment-22732
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.