eldan88 Posted July 15, 2012 Share Posted July 15, 2012 Hey, I wanted to know if there is a way to keep text in the input fields if a user hit the refresh button while typing something in a form. As an example how would I keep the users name in a text field if he enters it and hits the refresh button for this type of code below. <td width="232"><input type="text" id="name" name="name" value="<?=$name?>" /></td> Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/265689-how-to-keep-values-in-input-fields-after-page-gets-refreshed/ Share on other sites More sharing options...
jazzman1 Posted July 17, 2012 Share Posted July 17, 2012 You could be use js "onkeyup" event to grab the data from message field and send it up to php variable. Take a look this example -> http://www.w3schools.com/ajax/ajax_aspphp.asp jazzman Quote Link to comment https://forums.phpfreaks.com/topic/265689-how-to-keep-values-in-input-fields-after-page-gets-refreshed/#findComment-1362153 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.