PHP Line

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

    • Feb 2008
    • 31

    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
  • fconaway
    Sergeant

    • Feb 2008
    • 31

    #2
    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

    Comment

    • Marincky
      General

      • Apr 2006
      • 4539

      #3
      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.

      Comment

      • fconaway
        Sergeant

        • Feb 2008
        • 31

        #4
        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

        Comment

        • Marincky
          General

          • Apr 2006
          • 4539

          #5
          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.

          Comment

          • fconaway
            Sergeant

            • Feb 2008
            • 31

            #6
            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

            Comment

            • Marincky
              General

              • Apr 2006
              • 4539

              #7
              Re: PHP Line

              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.

              Comment

              • fconaway
                Sergeant

                • Feb 2008
                • 31

                #8
                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

                Comment

                • Marincky
                  General

                  • Apr 2006
                  • 4539

                  #9
                  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.

                  Comment

                  • fconaway
                    Sergeant

                    • Feb 2008
                    • 31

                    #10
                    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

                    Comment

                    • Marincky
                      General

                      • Apr 2006
                      • 4539

                      #11
                      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.

                      Comment

                      • Marincky
                        General

                        • Apr 2006
                        • 4539

                        #12
                        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.

                        Comment

                        • fconaway
                          Sergeant

                          • Feb 2008
                          • 31

                          #13
                          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

                          Comment

                          • Marincky
                            General

                            • Apr 2006
                            • 4539

                            #14
                            Re: PHP Line

                            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.

                            Comment

                            • fconaway
                              Sergeant

                              • Feb 2008
                              • 31

                              #15
                              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

                              Comment

                              Working...
                              X