Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retaining "browsed" value in a form

Status
Not open for further replies.

webdev007

Programmer
Sep 9, 2005
168
Is there a way to retain a “browsed” value
In a form including <input type="file" name="imagefile">
Within a HEREDOC.

Reason is: If I check for other value and a value for example does not pass my regex then
The user is offered a link back to the form
I know how to retain “text” values but do not know if it is possible to retain a browsed value
that has not been uploaded due to an exit() before script ends.
 
Your question indicates to me a misunderstanding about how web applications work.

Unlike console applications, web applications are not continuous -- they don't run the entire time. A web script produces some output that a web server streams to a web browser. By the time the browser has finished receiving and rendering the page, the script that produced it has already stopped running.]

So without some mechanism to send the data from an input to the script, either form submission or something like AJAX, no PHP script can know the value of any input.



Want the best answers? Ask the best questions! TANSTAAFL!
 
of course the form is submitted

it seems obvious

what I am interested in is to keep that value when sent back to the form
 
there is no way to do so. the input=file does not have a "value" that can be set otherwise it could be used to circumvent client security.

but it's not necessary anyway. you can make other control types sticky and the file will be already uploaded to your server so you can just save it somewhere non-volatile and keep a link to it in your session data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top