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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.