Menu

Can not get it to email data

Help
redmtnex
2006-02-22
2013-06-03
  • redmtnex

    redmtnex - 2006-02-22

    Hi
    Not exactly sure whats wrong. The form is created ok but it will not email out the contents of the form.
    Form can be found here
    http://www.californiacoastallodging.com/forms/use/test1/form1.html

    The proccess.php from that folder looks ok to me. See below for that.
    Thanks in advance for any help.
    Greg

    <?php
    include("global.inc.php");
    $errors=0;
    $error="The following errors occured while processing your form input.<ul>";
    pt_register('POST','EmailAddress');
    pt_register('POST','Comment');
    $Comment=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $Comment);if($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,}"."$",$EmailAddress)){
    $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="Email Address: ".$EmailAddress."
    Comment: ".$Comment."
    ";
    $message = stripslashes($message);
    mail("greg@bartfieldgroup.com","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 Address: </td><td> <?php echo $EmailAddress; ?> </td></tr>
    <tr><td>Comment: </td><td> <?php echo $Comment; ?> </td></tr>
    </table>
    <!-- Do not change anything below this line -->

    <?php
    }
    ?>

     
    • redmtnex

      redmtnex - 2006-02-22

      Forgot to add that all folders and files have been chmod to 755 or 777.

      Also when submiot is selected I now get the thank you html. Before I was getting internal server error.
      Greg

       

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.