Jump to content

Storing file location in MySQL


jdh23

Recommended Posts

Hello,

I am trying to store the url of some html files on the server into a MySQL table.  I am able to do this by using the html <input type = file ... > clicking the BROWSE button and cutting and pasting the location into a text field which gets saved when I press the SUBMIT button.

 

eg. after clicking BROWSE and selecting the file the text field beside the BROWSE button displays [/opt/lampp/htdocs/myfiles/myfile.html] which I cut and paste into the other text field as [../myfiles/myfile.html].

 

This cutting and pasting is tiresome and clunky and obviously lousy programming. I would like to automate the process so that after pressing BROWSE the other text field would be automatically filled.

 

I figure that I probably need to use the $_FILES super global but I'm not sure how to do this or even if using the super global is the right approach.  Any help would be most appreciated.

 

--John

Link to comment
https://forums.phpfreaks.com/topic/67926-storing-file-location-in-mysql/
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.