Menu

Invalid Email Address Error

Help
Jack
2006-01-15
2013-06-03
  • Jack

    Jack - 2006-01-15

    No matter what email address is put in the form, once it is submitted, an error appears saying:  The following errors occured while processing your form input.
    Invalid email address entered

    Any idea what's wrong?
    Thanks

     
    • TNTEverett

      TNTEverett - 2006-01-15

      This is usually due to a mixup in variable names between the form and the process.php file.  Other things can happen but this is very common.  If you know how to edit and interpret the files, open the form1.html and the process.php file and look to see that the variable from the forms email entry is consistent between the two files.  If you don't have a clue or are uncomfortable with this, send me a link to the form and a copy of your process.php file. 

       
    • Jack

      Jack - 2006-01-16

      My form is at http://www.gpmhydraulic.com/quiz.htm

      Here is my process.php file

      <?php
      include("global.inc.php");
      $errors=0;
      $error="The following errors occured while processing your form input.<ul>";
      pt_register('POST','FirstName');
      pt_register('POST','LastName');
      pt_register('POST','EmailAddress');
      pt_register('POST','Company');
      pt_register('POST','Telephone');
      pt_register('POST','CommentsorQuestions');
      $CommentsorQuestions=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $CommentsorQuestions);if($FirstName=="" || $LastName=="" || $EmailAddress=="" ){
      $errors=1;
      $error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
      }
      if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$LastName)){
      $error.="<li>Invalid email address entered";
      $errors=1;
      }
      if($errors==1) echo $error;
      else{
      $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
      $message="First Name: ".$FirstName."
      Last Name: ".$LastName."
      Email Address: ".$EmailAddress."
      Company: ".$Company."
      Telephone: ".$Telephone."
      Comments or Questions: ".$CommentsorQuestions."
      ";
      $message = stripslashes($message);
      mail("quizanswers@gpmhydraulic.com","Form Submitted at your website",$message,"From: phpFormGenerator");
      $make=fopen("admin/data.dat","a");
      $to_put="";
      $to_put .= $FirstName."|".$LastName."|".$EmailAddress."|".$Company."|".$Telephone."|".$CommentsorQuestions."
      ";
      fwrite($make,$to_put);
      ?>

      <!-- This is the content of the Thank you page, be careful while changing it -->

      <h2>Thank you!</h2>

      <table width=50%>
      <tr><td>First Name: </td><td> <?php echo $FirstName; ?> </td></tr>
      <tr><td>Last Name: </td><td> <?php echo $LastName; ?> </td></tr>
      <tr><td>Email Address: </td><td> <?php echo $EmailAddress; ?> </td></tr>
      <tr><td>Company: </td><td> <?php echo $Company; ?> </td></tr>
      <tr><td>Telephone: </td><td> <?php echo $Telephone; ?> </td></tr>
      <tr><td>Comments or Questions: </td><td> <?php echo $CommentsorQuestions; ?> </td></tr>
      </table>
      <!-- Do not change anything below this line -->

      <?php
      }
      ?>

       
    • Jack

      Jack - 2006-01-16

      Thank you for your help!  For some reason, the form generator made a process.php file that was looking for $LastName instead of $EmailAddress.  I edited that and it works great!

       
  • DMK

    DMK - 2011-01-25

    I was having this issue earlier and now it is an email error message!

    " I am getting the same error message. After reading this post I uninstalled and reinstalled the script from my hosts cpanel. I again tried to create a script which the generator said was created with no errors and when I click on the admin link or try to use the form I get the message '". I went in to look at the permissions the files were 777 the folders at 755 as per my web hosts instructions I rest permissions too folders at 755 and files at 644 and now I get this message "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" I have reset entered the correct info and still get this message."

    Here is my process php

    <?php
    include("global.inc.php");
    $errors=0;
    $error="The following errors occured while processing your form input.<ul>";
    pt_register('POST','Name');
    pt_register('POST','email');
    pt_register('POST','Phone');
    pt_register('POST','Typeofproject');
    pt_register('POST','Questionsorcomments');
    if($Name=="" || $email=="" || $Typeofproject=="" || $Questionsorcomments=="" ){
    $errors=1;
    $error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
    }
    if(!eregi("^+(+)*" ."@"."(+(+)*)+"."\\.{2,}"."$",$email)){
    $error.="<li>Invalid email address entered";
    $errors=1;
    }
    if($errors==1) echo $error;
    else{
    $where_form_is="http".($HTTP_SERVER_VARS=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
    $message="Name: ".$Name."
    email: ".$email."
    Phone: ".$Phone."
    Type of project: ".$Typeofproject."
    Questions or comments: ".$Questionsorcomments."

    Any help would be appreciated!

     
  • DMK

    DMK - 2011-01-29

    Turned out to be a setting in the php.ini file that needed to be turned on by my host.

     

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.