Basic Form Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Chrisgf
    Private

    • Jul 2007
    • 2

    Basic Form Problem

    Hi

    I'm having some problems getting the basic form I have set up to send emails to me. I have followed the lesson and think I have done everything correctly, but still don't get an email back.

    I have read the other messages and it hasn't helped.

    This is the php part of the html in the action.php page

    <?PHP
    $mailto = "chrisgf@clear.net.nz";
    $email = $HTTP_POST_VARS['email'];
    if ($email == "")
    {
    $email = $mailto;
    }
    $mailsubj = "Contact Form Submission";
    $mailhead = "From: $email \n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form :\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>

    The link to the page to enter the contact details is



    I have not bothered formation it to look good yet as I am trying to get the form to send the emails to me first.

    Please let me know if there is any other info you need.

    My account id is 15801.

    Thanks

    Chris
  • Andy128
    Major General

    • Dec 2005
    • 2317

    #2
    Re: Basic Form Problem

    Chris,
    The form is ok as is the code and the action.php page. I suspect that it may be a problem with the email provider itself.

    Could you try to set up a email account in the cpanel of your VH account and have the form send the contents there? In this we can see if indeed it is being blocked or other wise not sent/picked up by your email provider (clear.net.nz)


    Andy
    PHP- is a blast!

    Comment

    • Chrisgf
      Private

      • Jul 2007
      • 2

      #3
      Re: Basic Form Problem

      Thanks Andy,

      I set up a test mail account and changes the php with the new email address and tested it. It worked great.

      Many thanks for the help. It looked like my other email account was getting blocked.

      Regards

      Chriss

      Comment

      • Andy128
        Major General

        • Dec 2005
        • 2317

        #4
        Re: Basic Form Problem

        Any time.

        Andy
        PHP- is a blast!

        Comment

        Working...
        X