Jump to content

[SOLVED] Getting the file path


ksmatthews

Recommended Posts

HI There,

 

I am using the following HTML snippet to slect a file for upload ....

 

<input class = "default" name="myfile" type="file" />

 

When I submit the form however, the file path (string) that was used to populate the text field simply disappears and I am unable to populate the DB.

 

How can I capture it ?

 

regards,

 

Steven M

Link to comment
https://forums.phpfreaks.com/topic/82049-solved-getting-the-file-path/
Share on other sites

Add this to your <form> tag:

 

enctype="multipart/form-data"

 

But what you have to realize is that this wont populate your database, rather it will just upload the file onto your server. If you want to add the path name to your database you will have write a script for that as well.

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.