Posted 06 March 2008 - 04:54 PM
Please bare with me as I try to explain my issue with very weak terminology. Well, I'm using Dreamweaver to create a database that uses PHP & MySQL. Currently, I'm working on a page that inserts user entered data from a form into my database. Upon clicking insert, MySQL will reject the data if a field is null, not in correct format, etc. So, when the user returns to the previous page to correct the error all the information previously entered is now gone.
Posted 06 March 2008 - 06:27 PM
If so you can use the Spry widgets for form validation. This will prevent the form from processing until all field requirements are met, eliminating any need to go back.
Posted 06 March 2008 - 07:11 PM
<a href='java script:history.go(-1)' onmouseover='self.status=document.referrer;return true'>Return to Form</a>
Posted 27 April 2008 - 09:22 AM
<form action="thispage.php" method="post"> <input type="text" name="whatever" value="<?php echo (isset($_POST['whatever']) ? $_POST['whatever'] : ''); ?>" /> <input type="submit" name="insert" value="Insert" /> </form>
This will repopulate the 'whatever' field with the value that was entered before the user clicked 'Insert' and it will leave the fields blank when the form is loaded for the first time (i.e. when the post array is empty)
edit: sorry if this is an old thread i replied then saw the date.
Edited by OJB, 27 April 2008 - 09:24 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users