php script for Thank you page?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jjmao1
    Sergeant

    • Apr 2007
    • 31

    php script for Thank you page?

    I watched form tutorial part 1 and have a question. The tutorial shows we should add following script between head tag:

    <?PHP
    $email = $HTTP_POST_VARS[email];
    $mailto = "you@yourtsite.com"; modifiy this to my address
    $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))
    {


    This seems incomplete php code. But that is all shown on tutorial window. Where we can copy complete php script for inserting between head tag?

    Jay

    investmentinstock.com
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: php script for Thank you page?

    No, you have Copied (by hand ?) the code form the example image, not from the code window. The code in the window is:

    <?PHP
    $mailto ="exampleemail@example.com";
    $email = $HTTP_POST_VARS[email];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "Type your mail subject here";
    $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);
    ?>
    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

    • jjmao1
      Sergeant

      • Apr 2007
      • 31

      #3
      Re: php script for Thank you page?

      Thank you Navaldesign. Yes, I copied the code from tutorial window image. What do you mean by "code window"? If you mean the bottom window after I click page HTML and then select between head tag, it is completely blank. If you mean somewhere else, that is exactly what I am looking for. Where is that?

      Jay

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: php script for Thank you page?

        If you look at the Forms Tutorial pART 1, just ABOVE the image from where you have copied the code from, you will see that there is a code "window" . (Its not a real window, its the code "quoted"). That's the same code i gave you here. Copy it, and paste it in the Between Head (but you can also paste it in the Start of Page, or Inside Body, or wherever else you like, it is not important)
        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

        • Tom vR
          Brigadier General

          • Apr 2007
          • 1731

          #5
          Re: php script for Thank you page?

          Hi Nave,design,

          I have exactly the same problem as Jay. I understand fully where to copy the PHP code from, but when I open my Page HTML, that code is nowhere to be found. Here is my code and the PHP is not there:

          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
          <html>
          <head>
          <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
          <title>Thank You</title>
          <meta name="AUTHOR" content="Tom">
          <meta name="KEYWORDS" content="frequent,properties,houses,forsale,centur ion,southafrica,south,africa,zwartkop,pretoria">
          <meta name="DESCRIPTION" content="We are real estate agents in Centurion (nearby Pretoria), South Africa. We manage buying and selling of properties.">
          <meta name="GENERATOR" content="Created by BlueVoda">
          <style type="text/css">
          div#container
          {
          width: 800px;
          position: relative;
          margin-top: 0px;
          margin-left: auto;
          margin-right: auto;
          text-align: left;
          }
          body
          {
          text-align: center;
          margin: 0;
          }
          </style>
          </head>
          <body bgcolor="#E6E6FA" text="#000000" link="#800080" style="scrollbar-face-color:#E2261D;scrollbar-arrow-color:#0000FF;scrollbar-3dlight-color:#ECE9D8;scrollbar-darkshadow-color:#716F64;scrollbar-highlight-color:#FFFFFF;scrollbar-shadow-color:#ACA899;scrollbar-track-color:#D4D0C8;">
          <div id="container">
          <div id="bv_" style="position:absolute;left:0px;top:192px;width: 800px;height:608px;z-index:0" align="left">
          <img src="bv01070.gif" id="Shape2" align="top" alt="" border="0" width="800" height="608"></div>
          <div id="bv_" style="position:absolute;left:304px;top:760px;widt h:360px;height:29px;z-index:1" align="left">
          <font style="font-size:12px" color="#000000" face="verdana">Copyright &#169; Frequent Properties - All Rights Reserved</font><font style="font-size:16px" color="#000000" face="Times New Roman"> <br>
          </font></div>
          <img src="FP_Header_Colour_Web.jpg" id="Image2" alt="" align="top" border="0" width="800" height="197" style="position:absolute;left:0px;top:0px;width:80 0px;height:197px;z-index:2">
          <div id="bv_" style="position:absolute;left:8px;top:204px;width: 160px;height:588px;z-index:3" align="left">
          <img src="bv01071.gif" id="Shape1" align="top" alt="" border="0" width="160" height="588"></div>
          <div id="bv_" style="position:absolute;left:268px;top:284px;widt h:268px;height:90px;z-index:4" align="left">
          <font style="font-size:16px" color="#000000" face="Arial">Thank you for your enquiry.<br>
          <br>
          We will contact you ASAP.<br>
          <br>
          Frequent Properties at your service.</font></div>
          </div>
          </body>
          </html>

          Maybe Jay had the same problem. I will rather try to use the code you've given, but what could be wrong on my page that the code is missing?
          Bless you
          Tom

          Comment

          • navaldesign
            General & Forum Moderator

            • Oct 2005
            • 12080

            #6
            Re: php script for Thank you page?

            I'm not sure what you mean. The code is NOT in your thank you page, it is you who is supposed to put it in the page.

            Copy the code from the tutorial. (highlight it, then rig***lick, Copy)

            Then, go in your page, in BV, click on View, Page Html, click on the Start of Page (or Inside body, or between Head, it is NOT important) and paste the code you had copied earlier, in the lower window. The image in the tutorial is pretty clear.

            That's all.
            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

            • Tom vR
              Brigadier General

              • Apr 2007
              • 1731

              #7
              Re: php script for Thank you page?

              Got it. I've not read further down in the example page. Dull moment here...
              Bless you
              Tom

              Comment

              • Danny Canada
                Second Lieutenant

                • Apr 2007
                • 121

                #8
                Re: php script for Thank you page?

                Hi Guys

                I have created my "Contacts" page and followed the tutorial (#1). Good to this point!

                Here is what I did next;

                Upon finishing my contacts page with the form details, I then saved the page as "thankyou" and proceeded to finish the details in the "page properties" and the "page HTML". Inserted the script "between head tag" and saved and published.

                However, I cannot get it to work and only get an "web page cannot be found" error message.

                Does it matter if I didn't create a "new" page and simply used the "save page as" instead.

                For some reason I cannot get the submit form to work

                Thanks!

                Danny

                Comment

                • Danny Canada
                  Second Lieutenant

                  • Apr 2007
                  • 121

                  #9
                  Re: php script for Thank you page?

                  No need to respond guys as I have figured it out and it works like a charm. However, I did have one request and that is how to edit the default "submit" and "reset" buttons that are part of the forms section. Is there no way to edit the text or the size of the button?

                  Shame to build a nice site and then only have an option to use them.

                  Am I missing something?

                  Thanks

                  Danny

                  Comment

                  • Tom vR
                    Brigadier General

                    • Apr 2007
                    • 1731

                    #10
                    Re: php script for Thank you page?

                    I have the same request. I even tried to use an image button, but then you do not have the default built-in options required, i.e. no submit, reset, etc options.
                    Bless you
                    Tom

                    Comment

                    • navaldesign
                      General & Forum Moderator

                      • Oct 2005
                      • 12080

                      #11
                      Re: php script for Thank you page?

                      Use the Advanced Button. If you want you can make it submit, as well as reset. You can edit the text as you would normally for any text. You can also rig***lick it, properties, and change the style: background color, border color etc. You can also place an image as button, using the image as background.
                      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

                      • jenessa505
                        Private First Class

                        • May 2007
                        • 5

                        #12
                        Re: php script for Thank you page?

                        Hi there. I'm new to the website building thing and just had a quick question on forms. If the php code where it says $mailbody = "Values submitted from web site form :\n"; what exactly am I supposed to fill in there?

                        Comment

                        • navaldesign
                          General & Forum Moderator

                          • Oct 2005
                          • 12080

                          #13
                          Re: php script for Thank you page?

                          Yo can replace "Values submitted from web site form :" in whatever you wish your mail to start with, i.e. "A visitor has sent the following info:" . Don't touch the "\n" part
                          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

                          Working...
                          X