parse error on email form-new user PLEASE HELP~~

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

    • Mar 2008
    • 4

    parse error on email form-new user PLEASE HELP~~

    Hi,
    I've been trying to fix this for hours with no luck. My site si www.tribaltrends.com. I am getting the following error message:
    Parse error: syntax error, unexpected '@' in /home/jamyatsj/public_html/action.php on line 8
    I am not sure if its comming from the email form page, or the thank you page. This is very complicated for me.

    Here is my code:
    <?PHP
    $mailto = "terrapin48@charter.net"
    $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);


    Its probably something simple but I think I have been working on this for so long I am overlooking something!!
    Thanks for the help!!!
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: parse error on email form-new user PLEASE HELP~~

    You have missed the quotes that i added in red color in your own post.

    You have also misssed the last part of the code. It should be closing with

    ?>

    Add the missing part, save, publish, and test
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • Watdaflip
      Major General

      • Sep 2005
      • 2116

      #3
      Re: parse error on email form-new user PLEASE HELP~~

      Also after the second red quote naval added, place a semicolon

      Register/Login Script
      Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: parse error on email form-new user PLEASE HELP~~

        Originally posted by Watdaflip View Post
        Also after the second red quote naval added, place a semicolon
        He he! Thank you!
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • akasha1057
          Private

          • Mar 2008
          • 4

          #5
          Re: parse error on email form-new user PLEASE HELP~~

          hi, I did everything you both suggested and I am still getting the same error! I am so confused...here is the new code:
          <?PHP
          $mailto = "terrapin48@charter.net";
          $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);
          ?>

          I really appreciate the help otherwise I would be soooo LOST!!! I hope you can figure this out for me as I've had no help from support. They keep telling me to read the tutorials. :) THANKS AGAIN!!

          Comment

          • navaldesign
            General & Forum Moderator

            • Oct 2005
            • 12080

            #6
            Re: parse error on email form-new user PLEASE HELP~~

            Now you have missed the quotes before and after your email address, as well as the semicolon. Look at your post, i added them.
            Navaldesign
            Logger Lite: Low Cost, Customizable, multifeatured Login script
            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

            Comment

            • akasha1057
              Private

              • Mar 2008
              • 4

              #7
              Re: parse error on email form-new user PLEASE HELP~~

              Hi,
              I added what you indicated and still the same error message. Is it possible that I am just doing something wrong when I try and test it? I am going to the contact me page and trying to send something to my own email address? I have been working on this for hours and I just cant seem to get it right. This seems so complicated. When its finally correct will it send a test email to my own email address? I don't understand how it works. Can you explain? Here is the latest code taked from the thank you page that is suppose to disply when someone clicks the submit button on the contact us page:
              <?PHP
              $mailto = "terrapin48@charter.net";
              $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);
              ?>

              I wish I understood all this better as it would make it a lot easier to make my own corrections. THANKS AGAIN for all of the help!!

              Comment

              • navaldesign
                General & Forum Moderator

                • Oct 2005
                • 12080

                #8
                Re: parse error on email form-new user PLEASE HELP~~

                There is nothing in your script that can cause this problem. On the other hand, this is php code so it is not visible in your page. The only way would be to enter your account. If you wish, use the contact form on my site to mail me.
                Navaldesign
                Logger Lite: Low Cost, Customizable, multifeatured Login script
                Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                Comment

                • akasha1057
                  Private

                  • Mar 2008
                  • 4

                  #9
                  Re: parse error on email form-new user PLEASE HELP~~

                  Hi,
                  I have been working on this and still nothing. I did email you through your site. I have no idea why this is giving me such problem. According to BV its suppose to be easy and its not. I've received no help from customer support either. I TRULY appreciate you help in trying to resolve this for me. I wont make any changes so as not to interfere in waht you might do to fix this for me...THANKS SO MUCH!!!

                  Comment

                  Working...
                  X