Results 1 to 13 of 13

Thread: php script for Thank you page?
      
   

  1. #1
    jjmao1 is offline Sergeant
    Join Date
    Apr 2007
    Posts
    31

    Question 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

  2. #2
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  3. #3
    jjmao1 is offline Sergeant
    Join Date
    Apr 2007
    Posts
    31

    Default 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
    http://investmentinstock.com

  4. #4
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  5. #5
    Tom vR's Avatar
    Tom vR is offline Brigadier General
    Join Date
    Apr 2007
    Location
    Centurion, South Africa
    Posts
    1,733

    Default 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?

  6. #6
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  7. #7
    Tom vR's Avatar
    Tom vR is offline Brigadier General
    Join Date
    Apr 2007
    Location
    Centurion, South Africa
    Posts
    1,733

    Default Re: php script for Thank you page?

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

  8. #8
    Danny Canada is offline Second Lieutenant
    Join Date
    Apr 2007
    Posts
    121

    Question 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

  9. #9
    Danny Canada is offline Second Lieutenant
    Join Date
    Apr 2007
    Posts
    121

    Talking 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

  10. #10
    Tom vR's Avatar
    Tom vR is offline Brigadier General
    Join Date
    Apr 2007
    Location
    Centurion, South Africa
    Posts
    1,733

    Default 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.

  11. #11
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  12. #12
    jenessa505 is offline Private First Class
    Join Date
    May 2007
    Posts
    5

    Default 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?

  13. #13
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49