Andy, I need your help please! ...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Jeremy
    Brigadier General

    • Apr 2006
    • 1502

    Andy, I need your help please! ...

    Hey Andy!

    I have a .php script for a site we are still creating and it says this when you click submit:

    Parse error: syntax error, unexpected '>' in /home/rgcoscom/public_html/thankyou.php on line 43

    .. any clue?
    Go to: www.rgcollectibles.com
    Best regards,
    Jeremy

    www.cornwall4rent.com
  • davidundalicia
    General

    • Mar 2006
    • 6294

    #2
    Re: Andy, I need your help please! ...

    Jeremy, Email me a copy of the script and I will see what I can do !!
    or copy and paste it here...........
    Have fun
    Regards..... David

    Step by Step Visual Tutorials for the complete beginner
    Newbies / Beginners Forum
    FREE Membership Login Scripts: - Meta Tags Analyzer
    My Social Networking Site - Free Contact Forms
    Finished your New website!! Now get it noticed Here:

    Comment

    • Jeremy
      Brigadier General

      • Apr 2006
      • 1502

      #3
      Re: Andy, I need your help please! ...

      <script language="php">
      $email = $HTTP_POST_VARS[email];
      $mailto = "jeremy@bwservices.ca";
      $mailsubj = "RGC / Feedback received";
      $mailhead = "From: $email\n";
      reset ($HTTP_POST_VARS);
      $mailbody = "RGC / Feedback received:\n";
      while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
      if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj,





      Thanks!
      Best regards,
      Jeremy

      www.cornwall4rent.com

      Comment

      • davidundalicia
        General

        • Mar 2006
        • 6294

        #4
        Re: Andy, I need your help please! ...

        Jeremy, is this the complete script ??
        If the script is confidential then please email me the complete script

        if the above is only an extract then see below for the correct format:

        (extract only)
        <?PHP
        //Sending Email to form owner
        $mailto = "jeremy@bwservices.ca";
        $mailsubj = "RGC / Feedback received";
        $mailhead = "From: $email\n";
        reset ($HTTP_POST_VARS);
        $mailbody = "RGC / Feedback received:\n";
        while (list ($key, $val) = each ($HTTP_POST_VARS))
        {
        if ($key!="submit")
        {
        $mailbody .= "$key : $val\n";
        }
        }
        mail($mailto, $mailsubj, $mailbody, $mailhead);
        header("Location: confirmationpage.html");
        ?>
        Have fun
        Regards..... David

        Step by Step Visual Tutorials for the complete beginner
        Newbies / Beginners Forum
        FREE Membership Login Scripts: - Meta Tags Analyzer
        My Social Networking Site - Free Contact Forms
        Finished your New website!! Now get it noticed Here:

        Comment

        • Jeremy
          Brigadier General

          • Apr 2006
          • 1502

          #5
          Re: Andy, I need your help please! ...

          Let me try, then I will e-mail you. Thanks.
          Best regards,
          Jeremy

          www.cornwall4rent.com

          Comment

          • Andy128
            Major General

            • Dec 2005
            • 2317

            #6
            Re: Andy, I need your help please! ...

            Hey Jeremy-
            Sounds like you and David are well on your way to solving this. I'll be around.

            Cheers,

            Andy
            PHP- is a blast!

            Comment

            • davidundalicia
              General

              • Mar 2006
              • 6294

              #7
              Re: Andy, I need your help please! ...

              Hi andy, I stepped in because you must have been busy.........

              Jeremy:

              You need to go back to your contact form and nename every field first:
              name
              email
              subject
              message
              (all small letters as above)

              you then need to contract(shorten) the text fields to the left of your form fields(they overlap the form fields)

              I will post the complete php script for you shortly.
              (your script was only an extract from another script and would never work as it stood)
              Have fun
              Regards..... David

              Step by Step Visual Tutorials for the complete beginner
              Newbies / Beginners Forum
              FREE Membership Login Scripts: - Meta Tags Analyzer
              My Social Networking Site - Free Contact Forms
              Finished your New website!! Now get it noticed Here:

              Comment

              • davidundalicia
                General

                • Mar 2006
                • 6294

                #8
                Re: Andy, I need your help please! ...

                Hi Jeremy,
                Here is the very simple php script that will work with the field names that I
                posted earlier.
                Please note that this script does not contain any error checking or
                secutity features.
                It also sends a copy of the info submitted back to the client...............

                You must create a bv page called "confirmationpage" which will thank your client etc.
                If you already have a page as such, change the last but 1 line to your page name.

                This php script is called thankyou.php and you should use your ftp program
                to upload to the same directory as your other contact pages.

                let me know when you have completed ALL of the above, and I will test your form for you............any problems, email me or post here again.

                good luck

                <?PHP
                // Receiving variables
                @$name = addslashes($_POST['name']);
                @$email = addslashes($_POST['email']);
                @$subject = addslashes($_POST['subject']);
                @$message = addslashes($_POST['message']);
                //Sending Email to form owner
                $mailto = "jeremy@bwservices.ca";
                $mailsubj = "RGC / Feedback received";
                $mailhead = "From: $email\n";
                reset ($HTTP_POST_VARS);
                $mailbody = "RGC / Feedback received:\n";
                while (list ($key, $val) = each ($HTTP_POST_VARS))
                {
                if ($key!="submit")
                {
                $mailbody .= "$key : $val\n";
                }
                }
                mail($mailto, $mailsubj, $mailbody, $mailhead);
                // Autoresponder
                $mailto = $email;
                $mailsubj = "Copy of the info you Submitted";
                $mailhead = "From: jeremy@bwservices.ca\n";
                mail($mailto, $mailsubj, $mailbody, $mailhead);
                header("Location: confirmationpage.html");
                ?>
                Have fun
                Regards..... David

                Step by Step Visual Tutorials for the complete beginner
                Newbies / Beginners Forum
                FREE Membership Login Scripts: - Meta Tags Analyzer
                My Social Networking Site - Free Contact Forms
                Finished your New website!! Now get it noticed Here:

                Comment

                • ez-ez
                  Special Status

                  • Mar 2006
                  • 1329

                  #9
                  Re: Andy, I need your help please! ...

                  G'day Jeremy.. 2 things..

                  The flag you are using for Spanish Language doesn't look like the Spanish flag.. is that the Mexican Flag..??

                  Did you get the script problem sorted out..??

                  Comment

                  • Jeremy
                    Brigadier General

                    • Apr 2006
                    • 1502

                    #10
                    Re: Andy, I need your help please! ...

                    Hey Carlos!

                    Yes, the problem has been fixd, thanks. The flag that I am using was given by the customer who wanted me to add a Spanish language in the future.
                    Best regards,
                    Jeremy

                    www.cornwall4rent.com

                    Comment

                    Working...
                    X