Hiya, I am working on a generic JavaScript form checked, that takes the names of the elements, with the first two letters being the type of element, so its checks that it is right, if not gives a generic error message e.g. YOu Need To Fill this in and selects it, or Sorry only numbers are allowed in this box or Email addresses only, so reemail could mean a field which is required and an email address. .
JavaScript as long as you have a link to the object of the form, gives the elements in an array. Is there a way to do this in PHP? Have a form with the action something like register.php?action=updatemembers with members being a table name. The elements would be checked like JavaScripts checks them. Ok I would need to then set the order and manually do the call to the database, but it would be nice not to have to do the manuual checks on the elements. So a function to check all the elements in a form in PHP would be nice, then if it fails it would return an array with the wrong fields, and the error, this could then be used to make a page where they correct there mistakes. Thanks! Love, Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php