0

Hey, just a quick question about the following code:

<input name='name' type='text' class='form' value='<?php echo "" . (isset($_REQUEST['name'])) ? dataClean(ex_clean($_REQUEST['name'])) : FALSE . "";?>' size="40" rows='5' />

Now, if the user has errors in the form details and clicks submit, the page refreshes and it displays what errors need fixing, but it keeps the data that the user filled in.

Can anyone tell me how to go about adding a peice of code to this to make it so that it will keep the data with a regular page refresh?

I got some help with this the other day, but can't figure out how to do it with the PHP being used here.

Any ideas?

Basically I was the form to stay with all the inputs filled in after a regular page refresh. I know there's alot of help with this floating around but I couldn't find anything specific enough.

Any help appreciated

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by ello
0

Are you looking for the ability to stop entering part way thru filling the form, refresh the page and whatever you entered has been retained? If so, then you need to look into some javascript to save the values as soon as you complete each field.

0

Are you looking for the ability to stop entering part way thru filling the form, refresh the page and whatever you entered has been retained? If so, then you need to look into some javascript to save the values as soon as you complete each field.

Thanks for the reply. Yeaph pretty much. I was just wondering if there was a way to do it with PHP using the example I gave. Any way to do this with PHP?

0

Thanks for the reply. Yeaph pretty much.

I actualy decided to search this site for any people with the same problem [should have done it before, i know] but I came across this:

<input type='text' name='name' value=<?php echo $_REQUEST['name']; ?>>

I may give something like this a try.

Anyone know how I could get something like this to work along side the other code I have? Tried it, but nothing seems to work.

Edited by ello: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.