Jump to content

jd|

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jd|'s Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. jd|

    Form Data

    Anyone else have any ideas as to where I'm going wrong with this one ? Thanks JD
  2. jd|

    Form Data

    Thanks Ray cleaned the code up for the form. Never even noticed it was doing that cause of the loop had been playing about with it so much to get the form to display properly. Still no luck with getting the data the result from the form is... [code] show.php?Mem=1&array=a&Mem=2&array=b&Mem=3&array=c&Mem=5&array=d&Mem=6&array=e&Mem=7&array=f [/code] And the below is the form page... [code] $list = "<table border =\"1\"><tr><th>Forename</th>"; $list.= "<th>Surname</th>"; $list.= "<th>Handicap</th>"; $list.= "<th>Edit</th>"; $list.= "<th>Points</th></tr>"; $list.="<form action=\"show.php\" "; $list.="method =\"get\">"; while ($row= mysql_fetch_array($rs) ) { $Mem = $row["Mem_Id"]; $list.= "<tr>"; $list.= "<td>".$row["Forename"]."</td>"; $list.= "<td>".$row["Surname"]."</td>"; $list.= "<td>".$row["Hcap"]."</td>"; $list.= "<td> <input type=\"text\" name=\"Mem\" value=\"$Mem\">  </td>"; $list.= "<td> <input type=\"text\" name=\"array\" value=\"$array[array]\"> </td>"; } $list.= "</table>"; $list.= "<input type=\"submit\" value=\"Submit\">"; $list.= "</form>"; echo($list); ?> [/code]
  3. jd|

    Form Data

    Hi I have tried several various ways of getting this to work and the, script to show it uses the "foreach" array but will not work ! its the $array[array] thats causing the problem. The data entered in the form can be any interger value. and the table/ form is variable depending on the number of members in the database. Thanks JD [code] $list = "<table border =\"1\"><tr><th>Forename</th>"; $list.= "<th>Surname</th>"; $list.= "<th>Handicap</th>"; $list.= "<th>Edit</th>"; $list.= "<th>Points</th></tr>"; $form ="<form action=\"show.php\" "; $form.= "method =\"get\">";                 while ($row= mysql_fetch_array($rs) )                       {                           $array = array('point'==$value);                           $Mem = $row["Mem_Id"];                           $list.= "<tr>";                           $list.= "$test1";                           $list.= "<td>".$row["Forename"]."</td>";                           $list.= "<td>".$row["Surname"]."</td>";                           $list.= "<td>".$row["Hcap"]."</td>";                           $list.= "<td> <input type=\"text\" name=\"Mem\" value=\"$Mem\">  </td>";                           $list.= "<td> <input type=\"text\" name=\"array\" value=\"$array[array]\"> </td>";                       } $list.= "</table>"; echo ($list);                                       $form.= "<input type=\"submit\" value=\"Submit\">";                           $form.= "</form>";                         echo($form); ?>[/code]
  4. jd|

    Form Data

    I have tried everything I know and I always get the last result in the table no matter what I do. Any other suggestions ? JD
  5. Hi all This has been driving me crazy for a few days no matter what I do I can't get the result I want. I have a table with a form on it. the form is loop for the number off Members (in my test this is 7) and the user enters a score for each member. The form then passes the data to a new page for proccessing. This is where it all falls to pieces. I can see the data in the address bar but when I try any loop I can only ever display the last results. the output should be Mem=1 test = a Mem=2 test = b Mem=3 test = c etc... Data being passed using "get" function on the form page. show.php?Mem=1&point=a&Mem=2&point=b&Mem=3&point=c&Mem=5&point=d&Mem=6&point=e&Mem=7&point=f Any ideas ? Thanks JD
  6. Yes its mysql. But the problem I have is the query to excute all the members table one after each other  and the if events for this
  7. Anyone have an suggestions ? JD
  8. Hi I’m creating a site for my golf society and I have come to a stand still and am unsure on how to continue. I have a form that inputs a score for each member this is recorded in a table along with the course id. When all the data is entered I need to adjust everyone’s handicap based on certain rules the handicap is stored in a different table. i.e · The winnings handicap has 2 strokes deducted from their handicap · Anyone with more than 36 points has 0.5 deducted from their handicap · Anyone three points below the winner will receive 0.1 onto their handicap · Anyone six points below the winner will receive 0.2 onto their handicap. The problem is I think I can write the “if else” statements to cover all the eventualities but I have no clue on how to loop the data through the loop. Any help would be greatly appreciated. JD
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.