#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Posts
    5
    Rep Power
    0

    Webform not working


    webform not returning results:

    the site below is not emailing data from webform.

    assist2own dott comm
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,571
    Rep Power
    595
    Please read ManiacDan's New User Guide to learn how to post a proper question.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. Known to taste like chicken
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    In front of my computer
    Posts
    399
    Rep Power
    312
    im going to assume this is related to their other post
    "Take thy beak from out my heart, and take thy form from off my door" - Homer J Simpson / Edgar Allan Poe

    Looking for a project Idea?
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Posts
    5
    Rep Power
    0
    no this is from a different site and I moved servers
  8. #5
  9. Known to taste like chicken
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    In front of my computer
    Posts
    399
    Rep Power
    312
    Originally Posted by vavi2s
    no this is from a different site and I moved servers
    That's great, but it doesn't help us solve your problem.

    please read the new user guide and then we might be able to help you.

    We need to know more than "it doesn't work" to help you, like code (properly wrapped in the correct code tags), errors and what not.
    "Take thy beak from out my heart, and take thy form from off my door" - Homer J Simpson / Edgar Allan Poe

    Looking for a project Idea?
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Posts
    5
    Rep Power
    0

    hows that? the email is never delivered


    [PHPNET=""]<?php
    $e;
    foreach ($_POST as $values){
    if(empty($values)){
    $e=1;
    break;
    }
    }
    $email=$_POST['email'];

    if(!ctype_digit($_POST['zip'])){
    header("locationage1.php?id=3");
    exit;
    }
    if($e==1){
    header("locationage1.php?id=1");
    }else{
    //send an email
    $to = "abcbobby@yahoo.com";
    $subject = "form submission at your website";
    $message;
    foreach ($_POST as $key=>$values){
    $message=$message.' '.$key.' :'.$values;
    }
    $from = "Rent2ownassist.com";
    $headers = "From:" . $from;
    mail($to,$subject,$message);
    header("locationage2.html");}
    ?>[/PHPNET]
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,571
    Rep Power
    595
    Again properly wrap your code. You obviously did not read the guide nor the sticky at the top of this form about using [ PHP ] tags. Edit your post, highlight your code then click the php icon and be sure to add indentation so we can read it. Further, when you run this code, what does your SMTP log show?
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Posts
    5
    Rep Power
    0
    PHP Code:
    <?php
    $e
    ;
    foreach (
    $_POST as $values){
       if(empty(
    $values)){
           
    $e=1;
           break;
       } 
    }
    $email=$_POST['email'];

    if(!
    ctype_digit($_POST['zip'])){
    header("location:page1.php?id=3");    
    exit;
    }
    if(
    $e==1){
    header("location:page1.php?id=1");    
    }else{
    //send an email 
    $to "abcbobby@yahoo.com";
    $subject "form submission at your website";
    $message;
    foreach (
    $_POST as $key=>$values){
        
    $message=$message.' '.$key.' :'.$values;
    }
    $from "Rent2ownassist.com";
    $headers "From:" $from;
    mail($to,$subject,$message);
    header("location:page2.html");}
    ?>
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,571
    Rep Power
    595
    PHP Mail is not the easiest thing to use unless you really understand what you are doing. You really should use PHPMailer as it is much easier. In any case, one thing I see as a possibility is the @ in double quotes. PHP is probably recognizing that as an operator. You need to either escape it (\) or enclose it in single quotes. Had you looked at your SMTP log you would have seen that message being rejected with an invalid recipient error. You also should be aware that your message will show up at the other end all mashed together. You need to use '\r\n' for line breaks.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.

IMN logo majestic logo threadwatch logo seochat tools logo