Web Analytics Made Easy -
StatCounter Help With Form Confirmation Page - CodingForum


No announcement yet.

Help With Form Confirmation Page

  • Filter
  • Time
  • Show
Clear All
new posts

  • Help With Form Confirmation Page

    I have a website where friends and family access a form that uses radio button fields to pick the winners of NFL games each week. Right now when the users submit the form they are taken to a confirmation page that just shows the single team they picked to win each game. What I want to do is have the confirmation page show both teams for each game and place a check mark next to each team that the user picked. I really do not know where to strat. Any help will be appreicated!

  • #2
    Are you trying to make a poll?


    • #3
      No, it is not a poll. In the form there are 13 radio groups, 1 for each NFL game that week. People select 1 team to win each game. when they submit the form they are taken to a confirmation page that just has the teams they picked. Like so:

      (Radio) Washington vs (Radio) NY Giants
      (Radio) Dallas vs (Radio) Philadelphia
      (Radio) Baltimore vs (Radio) San Diego


      Let's say the user picks Washington, Philadelphia, and Baltimore

      On the confirmation page it just says:

      "You picked : WAS PHI BAL"
      (The abbrievation is what the value is for each radio choice.)

      What I WANT it to display on the confirmation page is:

      Here are your picks:

      (Check Mark) Washington vs NY Giants
      Dallas vs (Check Mark) Philadelphia
      (Check Mark) Baltimore vs San Diego

      This way when the user prints the confirmation page they do not just have the abbreviation of the teams they picked. They will have the matchup for each game as well as who they picked to win.

      I hope that makes sense.


      • #4
        So, something like bracket?

        Learn PHP.


        • #5
          You could do something with an if statement to check it (or not). eg.

          <input type="radio" <?php if ($selection="Washington") {echo "checked='checked'";} else {echo "";} ?> name="selection" />


          • #6
            My question is what do you do with the data later on? Just pick and bye?

            That is why I asked if it was a poll or not because In my eyes, you take who wins, confirm it, and then put it into some data file which can be later viewed as results on how many votes each team got in the match. Say:

            Denver (78%) vs Detroit (22%)
            Miami (46%) vs Pittsburg (54%)

            etc etc.


            • #7
              To make a printable confirmation page, that has the names expanded... you need to take a copy of your code that produces your original form and duplicate this, less the submit button, on the page where you want it to appear. Then do something like mark87 suggests. You need to have the text checked="checked" occur in the <input .....> fields that match the value the visitor picked...

              If you post your existing form code and from processing code, someone could suggest some specific code to accomplish this.
              Last edited by CFMaBiSmAd; Oct 9, 2006, 02:38 PM. Reason: spelling
              Finding out HOW to do something is called research, i.e. keep searching until you find the answer. After you attempt to do something and cannot solve a problem with it yourself, would be when you ask others for help.


              • #8
                Erindesign, to answer your question, when the form is submitted it saves the data to a csv file. When all the people have made their picks I take the csv file with all the data and put it into a table on a new webpage. This way everyone can see which teams everyone picked. Once the games are played I sort the list based on the total number of games each person correctly predicted. Like this:

                Mike WAS BAL DAL..etc.
                John NYG BAL PHI
                Tony WAS SD DAL

                So it is not like a poll where I would have %, but I do display the results that are submitted.

                I have never done anything with php and unfortunately, I am using Frontpage to make this form, and then editing the code as needed. I know this is not ideal, but it was very easy for me to set up and I host the page using IIS on my own Win2003 server, so everything meshes well. I have Dreamweaver, but have not had time to learn how to use it properly. I would really appreciate any help, even though I know most people hate Frontpage. If php is going to work, I will need help with the code. As I posted before I am trying to change the confirmation page from simply displaying the "value" of the radio field that the user picked, to showing the form again only with the radio choices that the user made with a check mark (See example.bmp)

                Thanks for everyone's help.
                Attached Files