> What I want to do is have the registration form, on submit, check the
 > data validity right then, if there is an error, redisplay
 > the form with an * next to the field that is incorrect.

This is the code logic rather than the actual working code:

---Start of PHP Page---
1. Check for form having been submitted
 a. If form submitted, check values that have been input
  i.  If valid form input, redirect to another page (or process form
data)
  ii. If not valid form input, set a 'problem flag' for each broken bit
 b. Do any other form input data manipulation that you need (strip html
or whatever)

2. Display form
 a. Do a check to see if there was a 'problem flag' set for a field - if
so display '*'
 b. If you've done it right, the post data can be reloaded into the form
---End of PHP Page---

That's the basic idea anyway - essentially, you process your form input
data at the start of the page and act on what you find.  If you want to
avoid problems with browser reloads doing another submit then it's
probably worth redirecting a successful form submit to a new page.

CYA, Dave





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to