Menu

Required field error

Help
keybiz
2006-08-28
2013-06-03
  • keybiz

    keybiz - 2006-08-28

    I just used the phpformgenerator and published my webpage with the form on it.

    I get the following error but the email address is valid and required fields are listed and I completed all fields... not just the required ones.

    Why am I getting these errors?  Can someone help me?

    Thanks
    keybiz

    -----------error msg-------------------
    The following errors occured while processing your form input.
    You did not enter one or more of the required fields. Please go back and try again.
    Invalid email address entered
    ---------error msg---------------------

     
    • TNTEverett

      TNTEverett - 2006-08-28

      This error occurs if you enter in any extra spaces at the end of your email address (common with people who type fast). 
      You can try adding this line right above the error test. 
      $EmailAddress=trim($EmailAddress);
      if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$EmailAddress)){
      $error.="<li>Invalid email address entered";
      $errors=1;
      }

      This assumes your form variable for the email address is EmailAddress.  The line added to the process.php file is:
      $EmailAddress=trim($EmailAddress);
      It is added right above the line that tests the syntax of the email address. 

      Let me know if you still have an issue.

       
    • rand0m

      rand0m - 2006-09-22

      I'm having the same problems, even after adding that line.
      Strange thing is I have it working on my personal server, but on my client's server which is a Windows server I get this error. Is this possibly an issue with Windows servers?

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.