+ Reply to Thread
Results 1 to 15 of 15

Thread: PHP Line
      
   

  1. #1
    fconaway is offline Sergeant
    Join Date
    Feb 2008
    Location
    Daphne, Alabama
    Posts
    31

    Question PHP Line

    Hi,
    I want to put a form on my page. I follow the tutorial word for word. After creating the form page I created a thanks you page as in the tutorial. Then I click on page HTML . On the HTML page I couldn't "PHP" line. What am I doing wrong?

    Francis

  2. #2
    fconaway is offline Sergeant
    Join Date
    Feb 2008
    Location
    Daphne, Alabama
    Posts
    31

    Default Re: PHP Line

    I publish my website www.baldwinalumnaedst.org but I still have not been able to get the form to work on the Contact Page. What am I doing wrong? Please help!. Thanks

  3. #3
    Marincky's Avatar
    Marincky is offline General
    Join Date
    Apr 2006
    Location
    Warwickshire, UK
    Posts
    4,565

    Default Re: PHP Line

    Open your 'action' page then right click on the space OUTSIDE your website area and click on 'page properties' then in the drop down where it says 'file extension' change this from html to php and then republish that page.
    Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

  4. #4
    fconaway is offline Sergeant
    Join Date
    Feb 2008
    Location
    Daphne, Alabama
    Posts
    31

    Default Re: PHP Line

    I open 'action' page then right click on the space OUTSIDE your website area and click on 'page properties' then in the drop down where it says 'file extension' change this from html to php and then I publish that page. When open page I still get page not found "http//404" error. Is their more to it.

    Francis

  5. #5
    Marincky's Avatar
    Marincky is offline General
    Join Date
    Apr 2006
    Location
    Warwickshire, UK
    Posts
    4,565

    Default Re: PHP Line

    Francis,

    I don't think this page has published.

    Open it again, make sure it is definitely called 'action' all lower case, make sure it is in php format, then try publishing again. Let me know when you have done this.
    Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

  6. #6
    fconaway is offline Sergeant
    Join Date
    Feb 2008
    Location
    Daphne, Alabama
    Posts
    31

    Default Re: PHP Line

    Hi Ramsey,
    I re-visit the tutorial, I created a thanks you page as in the tutorial. I click on the space OUTSIDE your website area and click on 'page properties' then in the drop down where it says 'file extension' change this from html to php. Then I click on the space OUTSIDE your website area and click on page HTML . On the HTML page is this where I type
    <?php
    $email = $HTTP_POST_VARS[email];
    $mailto = baldwinalumnaedst******.com;
    $mailsubj = "contact form Submission";

    Save page & publish page, Is this correct.

    Francis

  7. #7
    Marincky's Avatar
    Marincky is offline General
    Join Date
    Apr 2006
    Location
    Warwickshire, UK
    Posts
    4,565

    Default Re: PHP Line

    Quote Originally Posted by fconaway View Post
    Hi Ramsey,
    I re-visit the tutorial, I created a thanks you page as in the tutorial. I click on the space OUTSIDE your website area and click on 'page properties' then in the drop down where it says 'file extension' change this from html to php. Then I click on the space OUTSIDE your website area and click on page HTML . On the HTML page is this where I type
    <?php
    $email = $HTTP_POST_VARS[email];
    $mailto = baldwinalumnaedst******.com;
    $mailsubj = "contact form Submission";

    Save page & publish page, Is this correct.

    Francis
    Francis,

    open the page HTML again, via your page properties, and then click on 'begining of body' tab and paste everything below I have put in red into there.

    <?PHP
    $mailto = "baldwinalumnaedst******.com";
    $email = $HTTP_POST_VARS['email'];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "Enquiry From Website";
    $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);
    ?>


    Once you have done this, republish this page and then test your form.
    Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

  8. #8
    fconaway is offline Sergeant
    Join Date
    Feb 2008
    Location
    Daphne, Alabama
    Posts
    31

    Default Re: PHP Line

    Ramsey,
    I click on 'beginning of body' tab and paste everything in red into the box and click OK. Save and published. Got on the internet, pull up the website www.baldwinalumnaedst.org click on Contact Us Page, put in my name, my email address and wrote a message, then Submit. It went to the Action.php page/Thank You page, it worked.

    Thank you so much, I know who to email if I have many more problem, and I will have problem, you are the best.

    God bless you,
    Francis

  9. #9
    Marincky's Avatar
    Marincky is offline General
    Join Date
    Apr 2006
    Location
    Warwickshire, UK
    Posts
    4,565

    Default Re: PHP Line

    Maybe not the best Francis, but I do like to think I help those who need it and explain it in a way that is simple and fitting. I am glad you are sorted.
    Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

  10. #10
    fconaway is offline Sergeant
    Join Date
    Feb 2008
    Location
    Daphne, Alabama
    Posts
    31

    Default Re: PHP Line

    Ramsey,
    I knew I will have a problem (I'm sorry). The problem is once I send the message from the Contact Us page, it goes to the Action page/Thank you page, this is working fine. Now, when I go to check my email, there is no message.

    Sorry to bother you,
    Francis

  11. #11
    Marincky's Avatar
    Marincky is offline General
    Join Date
    Apr 2006
    Location
    Warwickshire, UK
    Posts
    4,565

    Default Re: PHP Line

    I will email you with the same email address on your form. Let me know if you get it.
    Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

  12. #12
    Marincky's Avatar
    Marincky is offline General
    Join Date
    Apr 2006
    Location
    Warwickshire, UK
    Posts
    4,565

    Default Re: PHP Line

    Have emailed you. If you haven't received please check in the code I gave you above that your email address is correct.
    Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

  13. #13
    fconaway is offline Sergeant
    Join Date
    Feb 2008
    Location
    Daphne, Alabama
    Posts
    31

    Default Re: PHP Line

    Ramsey,
    The email address is incorrect when I email you, I email part of the website address. There is no dst in the email address (sorry, I'm new at this). The correct email address is baldwinalumnae******.com the website address is www.baldwinalumnaedst.org. First, send me an email to be on the safe side, and I will respond.

    Francis

  14. #14
    Marincky's Avatar
    Marincky is offline General
    Join Date
    Apr 2006
    Location
    Warwickshire, UK
    Posts
    4,565

    Default Re: PHP Line

    Quote Originally Posted by fconaway View Post
    Ramsey,
    The email address is incorrect when I email you, I email part of the website address. There is no dst in the email address (sorry, I'm new at this). The correct email address is baldwinalumnae******.com the website address is www.baldwinalumnaedst.org. First, send me an email to be on the safe side, and I will respond.

    Francis
    In that case you need to change the email within the code you put on the page:

    <?PHP
    $mailto = "
    baldwinalumnae******.com";
    $email = $HTTP_POST_VARS['email'];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "Enquiry From Website";
    $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);
    ?>


    Just open up the html again and change the email to the correct one and then republish your page again.
    Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

  15. #15
    fconaway is offline Sergeant
    Join Date
    Feb 2008
    Location
    Daphne, Alabama
    Posts
    31

    Default Re: PHP Line

    Ramsey,
    I change it to the correct email address it didn't work, I even tried sending it to my personal email address it didn't work. I even thought the email addresses may have seen it as spam mail, but it wasn't in spam. Somewhere down the road, if someone else has the same problem and worked it out please let me know. Thanks for all your help.

    Bless you,
    Francis

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