rasherb Posted December 18, 2007 Share Posted December 18, 2007 I really want reload a page I have with a huge form on it without losing any information users have typed into the form. Can php access form data before the form is submitted like javascript (document.form.name.value)? Any other ideas for keeping form data on refresh without submitting the form? Any help would be much appreciated! Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted December 18, 2007 Share Posted December 18, 2007 AJAX.. You will need to pass the info using javascript to a php file. Quote Link to comment Share on other sites More sharing options...
chigley Posted December 18, 2007 Share Posted December 18, 2007 Why do you need to refresh the page?? :S Quote Link to comment Share on other sites More sharing options...
rasherb Posted December 18, 2007 Author Share Posted December 18, 2007 Thanks, So if I use a link to refresh the page... <?php echo "<form name=\"form\" method=\"post\" action=\"submit.php?useridnum=$usernum\">"; echo "Title: <input type=\"text\" name=\"title\" size=\"70\"></textarea>"; echo "<a href=\""; echo $_SESSION['PHP_SELF']; echo "?show=1\"><img border=\"0\" src=\"close.gif\"></a>"; ?> Where would the java go? Quote Link to comment Share on other sites More sharing options...
rasherb Posted December 18, 2007 Author Share Posted December 18, 2007 The form has sections (it's huge) I use links and if(isset){} to expand and contract the sections so they are not all on the page at once, confusing the heck out of users. Quote Link to comment Share on other sites More sharing options...
emehrkay Posted December 18, 2007 Share Posted December 18, 2007 The form has sections (it's huge) I use links and if(isset){} to expand and contract the sections so they are not all on the page at once, confusing the heck out of users. use multiple pages and process on each page, what you are describing is a confusing way to handle it. or use javascript to show/hide certain areas of the form Quote Link to comment Share on other sites More sharing options...
rasherb Posted December 18, 2007 Author Share Posted December 18, 2007 Well, time to learn some javascript... Thanks all! Quote Link to comment Share on other sites More sharing options...
emehrkay Posted December 18, 2007 Share Posted December 18, 2007 Well, time to learn some javascript... Thanks all! This wont be too difficult , make a post in the js forum and we'll help you out Quote Link to comment 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.