Submit button!!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ghostrider
    New Member
    • Jan 2007
    • 34

    Submit button!!!

    Hello everyone, I'm in need of some help. I created a simple customer information page requesting name, address, etc., with a submit button. That when clicked it will give you a Thank you statement. But I cannot seem to get it to work right. Can somone give me some pointers.
  • eWish
    Recognized Expert Contributor
    • Jul 2007
    • 973

    #2
    We can not help without seeing the markup. It may not even be an HTML or CSS issue.

    --Kevin

    Comment

    • nomad
      Recognized Expert Contributor
      • Mar 2007
      • 664

      #3
      Originally posted by ghostrider
      Hello everyone, I'm in need of some help. I created a simple customer information page requesting name, address, etc., with a submit button. That when clicked it will give you a Thank you statement. But I cannot seem to get it to work right. Can somone give me some pointers.
      question for you:
      What actions do you have for your submit button.
      Are you emailing the info or is it going into a db. (database)
      what part are you having problems are.
      click the submit button then it redirect you to the thank you page.
      What languages are you using html and php?

      nomad

      Comment

      • ghostrider
        New Member
        • Jan 2007
        • 34

        #4
        Originally posted by nomad
        question for you:
        What actions do you have for your submit button.
        Are you emailing the info or is it going into a db. (database)
        what part are you having problems are.
        click the submit button then it redirect you to the thank you page.
        What languages are you using html and php?

        nomad
        I'm using html. I would like for it to say thank you when it is done. If I understand it correctly I need to save it as a link that the button points to right, so when it is clicked it will know to open that link?

        Comment

        • ghostrider
          New Member
          • Jan 2007
          • 34

          #5
          Originally posted by eWish
          We can not help without seeing the markup. It may not even be an HTML or CSS issue.

          --Kevin
          Understood will post it once I get off work.

          Comment

          • nomad
            Recognized Expert Contributor
            • Mar 2007
            • 664

            #6
            Originally posted by ghostrider
            I'm using html. I would like for it to say thank you when it is done. If I understand it correctly I need to save it as a link that the button points to right, so when it is clicked it will know to open that link?
            You are some what right..
            When you click the submit button it does two things.
            1. send the info the client input ie email, db
            2. then it redirect to a thank you page.

            Might look like this on your php page
            Code:
            // send email 
            $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
            // redirect to success page 
            if ($success){
              print "<meta http-equiv=\"refresh\" content=\"0;URL=thankscontact.htm\">";
            }
            else{
              print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
            }
            nomad

            Comment

            • ghostrider
              New Member
              • Jan 2007
              • 34

              #7
              Hey is what I have:

              [CODE=html]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
              <html>
              <!-- Created with the CoffeeCup HTML Editor 2007 -->
              <!-- http://www.coffeecup.c om/ -->
              <!-- Brewed on 2/18/2008 4:33:53 PM -->
              <head>
              <title>Custom er Information</title>
              </head>
              <body>
              <form>
              First name:
              <input type="text" name="firstname " size="20">
              <br>
              Last name:
              <input type="text" name="lastname" size="20">
              <br>
              Address:
              <input type="text" address="addres s" size "50">
              <br>
              City:
              <input type="text" city="city" size="20">
              <br>
              State:
              <input type="text" state="state" size="2">
              <br>
              Zip Code:
              <input type="text" zip code="zipcode" size="5">
              <br>
              <input type="submit" value="Submit Button">
              </form>
              </body>
              </html>[/CODE]
              Last edited by eWish; Feb 19 '08, 10:01 PM. Reason: Please use [CODE][/CODE] tags

              Comment

              • eWish
                Recognized Expert Contributor
                • Jul 2007
                • 973

                #8
                Your basic problem is this that you are not sending the data anywhere. This is an example of what the first line should look like.

                [CODE=html]<form name="Some Name" method="POST" action="some_se rver_side_scrip t.pl">[/CODE]
                You will need a server-side language to achieve what you want. Therefore, this is not an HTML or CSS issue.

                HTML Forms and Inputs

                --Kevin

                Comment

                • ghostrider
                  New Member
                  • Jan 2007
                  • 34

                  #9
                  Thanks for the help!

                  Comment

                  • ghostrider
                    New Member
                    • Jan 2007
                    • 34

                    #10
                    Hey thanks again eWish changing the first line of my code did it.

                    Comment

                    • eWish
                      Recognized Expert Contributor
                      • Jul 2007
                      • 973

                      #11
                      Good glad to hear it!

                      Comment

                      Working...