I have a multi-step form in which i have to choose an image in step 3 and have to pass the image directory or path as a session in another input field in step 4 before submitting form.How I can pass the image path to finally keep it in database??Please Help !( PHP & Mysql)
Share
You can’t. There is no way to know where on the user’s hard drive a file is stored, let alone a way to go and get it from the web browser (imagine if I made a website that went after your windows directory files; even your password files — there are obvious security reasons why web browsers don’t allow this).
What you can do is upload the image, then use info stored in
$_FILESto temporarily track where the file is located on the server, and at final submission do whatever you need to do with it.