Halfpint
Halfpint

Reputation: 4077

Is there a way I can set the value of a file upload so it doesn't whipe on page refresh

Before my page is submitted, PHP is used to verify the integrity of all my data. I am currently using if(isset($_POST['bannerTitle'])){ echo htmlentities($_POST['bannerTitle']);} to keep the set values of my input data fields, but when the page is redrawn my uploaded file data is naturally reset to null.

Is there anything I can do to keep the selected users selected img file?

Upvotes: 0

Views: 58

Answers (1)

Carlos
Carlos

Reputation: 238

file uploads doesnt store any post data by default, but you can use $_FILE['fieldname']['name'] to retrieve its name and store at your database.

Upvotes: 1

Related Questions