Menu

Invalid email address entered

Help
pvranch
2011-12-27
2013-06-03
  • pvranch

    pvranch - 2011-12-27

    I get the following error with every form I try to create and use"

    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 check permisions and as far as I can tell they are all correct everything is 777 except for process.php, admin and files, thay are 755. Below 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','EmailAddess');
    pt_register('POST','Message');

    $Message=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $Message);if($EmailAddess=="" $Message=="" ){
    $errors=1;
    $error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
    }
    if(!eregi("+(+)*" ."@"."(+(+)*)+"."\\.{2,}"."$",$EmailAddess)){
    $error.="<li>Invalid email address entered";
    $errors=1;
    }
    if($errors==1) echo $error;
    else{
    $where_form_is="http".($HTTP_SERVER_VARSHTTPS?=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
    $message="Email Addess: ".$EmailAddess."
    Message: ".$Message."
    ";
    $message = stripslashes($message);
    mail("jsktech@…","Form Submitted at your website",$message,"From: phpFormGenerator");
    ?>

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

    <h2>Thank you!</h2>

    <table width=50%>
    <tr><td>Email Addess: </td><td> <?php echo $EmailAddess; ?> </td></tr>
    <tr><td>Message: </td><td> <?php echo $Message; ?> </td></tr>
    </table>
    <!- Do not change anything below this line ->

    <?php
    }
    ?>

     
  • Jim Brez

    Jim Brez - 2012-01-07

    sounds like a permission error to me.
    Change all Directories to 755 and files to 644

     
  • TNTEverett

    TNTEverett - 2012-03-06

    pt_register('POST','EmailAddess');
    This is an old method that WILL create problems with newer revisions of PHP.
    Change all of these to:
    $EmailAddess=$_POST;

    Then remove this line:
    include("global.inc.php");

     

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.