using HTML input type = "file"

Reply

Join Date: Dec 2008
Posts: 5
Reputation: vikingGirl is an unknown quantity at this point 
Solved Threads: 0
vikingGirl vikingGirl is offline Offline
Newbie Poster

using HTML input type = "file"

 
0
  #1
Jun 19th, 2009
I'm creating an input form for users so that they can input various bits of info into a db. One of the fields is so that they can upload a file, which puts the file onto the web server and the path to it into the db. The problem is if anyone edits the data after a file has been uploaded, the path to the file gets overwritten in the db with an empty string. I get round this problem in all other entry fields by pulling the data out the db and putting in the form entry box, but can't find a way to do this using the input type = "file" tag. Does anyone know how to do this?
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 331
Reputation: freshfitz is an unknown quantity at this point 
Solved Threads: 27
freshfitz freshfitz is offline Offline
Posting Whiz

Re: using HTML input type = "file"

 
0
  #2
Jun 21st, 2009
Why can't you pull the data out for the file location and put that in the entry field if it's just a text url?. you can do an if else statement so if that field is blank in the form it doesn't execute the write to database action for that specific field
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC