PDA

View Full Version : Registration Error Messages for Required Fields


GlobalFusion
04-04-2005, 12:10 PM
in register.php I have an extra 5 or so text fields that I have made required.



Thats no problem. Already Done.





My problem lies in the Error Response if it isnt filled.



currently, I see that missing fields are handled like so:





// check for missing fields

if (($_POST['coppauser'] AND empty($_POST['parentemail'])) OR empty($_POST['username']) OR empty($_POST['email']) OR empty($_POST['firstname']) OR empty($_POST['lastname']) OR empty($_POST['city']) OR empty($_POST['state']) OR empty($_POST['country']) OR empty($_POST['heardabout']) OR empty($_POST['emailconfirm']) OR (empty($_POST['password']) AND empty($_POST['password_md5'])) OR (empty($_POST['passwordconfirm']) AND empty($_POST['passwordconfirm_md5'])))

{

eval('$errors[60] = "' . fetch_phrase('fieldmissing', PHRASETYPEID_ERROR) . '";');

}





Which produces:



----------------

The following errors occurred during your registration:

You have not completed all of the required fields: username, password, and email address.
The string you entered for the image verification did not match what was displayed.
----------------



I assume that $errors[60] is the variable that holds it.. but where is it defined?