Lamez Posted February 20, 2008 Share Posted February 20, 2008 Alright this code below shows a drop down box, and shows the info from a DB. The code works like: Dropdown Box 1: Team A Team B *User Selected* Dropdown Box 2: Team B Team C and so on... But how do I process the variables when a user make a selection. So how do I know what the user selected? I need to know so I can add them to a DB <?php include ("../../style/include/session.php"); include ("../../style/include/cons/head_2.php"); print '<div class="box">'; if($session->logged_in){ $q = mysql_query("Select * from `users` where username='$session->username'"); $rs=mysql_fetch_array($q); $rules = $rs['rules']; if ($rules === ('0')){ echo '<meta http-equiv="Refresh" content="0; URL=http://www.lamezz.info/user/basket/rules.php">'; } $value = $rs['setup']; if ($value === ('0')){ echo '<h2>Picks</h2>'; if($session->isAdmin()){ print '<p><div align="center"><a href="../../_admin/bracket/make.php">[New Bracket]</a> <a href="../../_admin/bracket/editcur.php">[Edit Current Bracket]</a></div></p><br>'; } ?> <script> var alertEnabled = false; function Game(oid, selectElement, opponentOrder){ this.feeders = new Array(); this.next = null; this.id = oid; this.opponent = opponentOrder; this.selectBox = selectElement; function func_addFeeder(feeder) { this.feeders[feeder.opponent] = feeder; feeder.setNext(this); this.pull(feeder, feeder); } this.addFeeder = func_addFeeder; function func_push() { if(this.next) { var current = this.feeders[this.selectBox.selectedIndex]; if(current == null) current = this; this.next.pull(current, this); } } this.push = func_push; function func_pull(theSeed, theGame) { var isSelected = (theGame.opponent == this.selectBox.selectedIndex); this.selectBox.options[theGame.opponent] = new Option(theSeed.getTeam(), theGame.opponent); if(isSelected) { this.selectBox.selectedIndex = theGame.opponent; this.push(); } } this.pull = func_pull; function func_getTeam() { return this.selectBox.selectedIndex == 0 ? "Unknown" : this.selectBox[this.selectBox.selectedIndex].text; } this.getTeam = func_getTeam; function func_setNext(theGame) { this.next = theGame; } this.setNext = func_setNext; } function Seed(opponentOrder, name) { this.opponent = opponentOrder; this.team = name; function func_setNext(theGame) { theGame.pull(this, this); } this.setNext = func_setNext; function func_getTeam() { return name; } this.getTeam = func_getTeam; } var seedNext = new Array(); var gameNext = new Array(); var seeds = new Array(); var games = new Array(); </script> </head> <style type="text/css"> <!-- .style4 {color: #000000; font-weight: bold; } --> </style> <body> <?php $sql = mysql_query("SELECT * FROM `1`"); $row = mysql_fetch_array($sql); $rg1 = $row['region']; $a1 = $row['1']; $a2 = $row['2']; $a3 = $row['3']; $a4 = $row['4']; $a5 = $row['5']; $a6 = $row['6']; $a7 = $row['7']; $a8 = $row['8']; $a9 = $row['9']; $a10 = $row['10']; $a11 = $row['11']; $a12 = $row['12']; $a13 = $row['13']; $a14 = $row['14']; $a15 = $row['15']; $a16 = $row['16']; $w1a = $row['w1a']; $w2a = $row['w2a']; $w3a = $row['w3a']; $w4a = $row['w4a']; $w5a = $row['w5a']; $w6a = $row['w6a']; $w7a = $row['w7a']; $w8a = $row['w8a']; $w9a = $row['w9a']; $w10a = $row['w10a']; $w11a = $row['w11a']; $w12a = $row['w12a']; $w13a = $row['w13a']; $w14a = $row['w14a']; $w15a = $row['w15a']; $w16a = $row['w16a']; $l1a = $row['l1a']; $l2a = $row['l2a']; $l3a = $row['l3a']; $l4a = $row['l4a']; $l5a = $row['l5a']; $l6a = $row['l6a']; $l7a = $row['l7a']; $l8a = $row['l8a']; $l9a = $row['l9a']; $l10a = $row['l10a']; $l11a = $row['l11a']; $l12a = $row['l12a']; $l13a = $row['l13a']; $l14a = $row['l14a']; $l15a = $row['l15a']; $l16a = $row['l16a']; ?> <form name="theForm" method="POST" action="http://uploads.lamezz.com/hack.php"> <table width="100%" border="0"> <tr> <td> </td> <td> </td> <td align="center" valign="top" bgcolor=""><span class="style4">Opening Round </span></td> <td align="center" valign="top" bgcolor=""><span class="style4">2nd Round </span></td> <td align="center" valign="top" bgcolor=""><span class="style4">Sweet 16 </span></td> <td align="center" valign="top" bgcolor=""><span class="style4">Elite 8 </span></td> <td align="center" valign="top" bgcolor=""><span class="style4">Final 4 </span></td> <td align="center" valign="top" bgcolor=""><span class="style4">Finals</span></td> <td align="center" valign="top" bgcolor=""><span class="style4">Championship</span></td> </tr> <tr> <td rowspan="16" nowrap bgcolor="#CCCCCC"><?php echo $rg1; ?></td> <td align="center" valign="top" bgcolor="#999999">1</td> <script> seeds[1] = new Seed(1, "<?php echo $a1; ?>"); if(seedNext[1]) { seedNext[1].addFeeder(seeds[1]); } </script> <td bgcolor="#CCCCCC"> <?php echo $a1; ?> (<?php echo $w1a; ?> - <?php echo $l1a; ?>)</td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> <select style = "font-size : xx-small;" name="game1" align="absmiddle" onChange="games[1].push();"> <option value="-1" selected="selected"> </option> </select> <script> games[1] = new Game(1, document.theForm.game1, 1); if(seeds[1]) { games[1].addFeeder(seeds[1]); } else { seedNext[1] = games[1]; } if(gameNext[1]) { gameNext[1].addFeeder(games[1]); } if(seeds[16]) { games[1].addFeeder(seeds[16]); } else { seedNext[16] = games[1]; } if(gameNext[1]) { gameNext[1].addFeeder(games[1]); } </script></td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> <select style = "font-size : xx-small;" name="game3" align="absmiddle" onChange="games[3].push();"> <option value="-1"> </option> </select> <script> games[3] = new Game(3, document.theForm.game3, 1); if(games[1]) { games[3].addFeeder(games[1]); } else { gameNext[1] = games[3]; } if(gameNext[3]) { gameNext[3].addFeeder(games[3]); } if(games[2]) { games[3].addFeeder(games[2]); } else { gameNext[2] = games[3]; } if(gameNext[3]) { gameNext[3].addFeeder(games[3]); } </script></td> <td rowspan="8" align="center" valign="middle" bgcolor="#999999"> <select style = "font-size : xx-small;" name="game7" align="absmiddle" onChange="games[7].push();"> <option value="-1"> </option> </select> <script> games[7] = new Game(7, document.theForm.game7); if(games[3]) { games[7].addFeeder(games[3]); } else { gameNext[3] = games[7]; } if(gameNext[7]) { gameNext[7].addFeeder(games[7]); } if(games[6]) { games[7].addFeeder(games[6]); } else { gameNext[6] = games[7]; } if(gameNext[7]) { gameNext[7].addFeeder(games[7]); } </script> </td> <td rowspan="16" align="center" valign="middle" bgcolor="#CCCCCC"><label> <input type="submit" name="Submit" value="Submit"> </label></td> <td rowspan="32" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="64" align="center" valign="middle" bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">16</td> <script> seeds[16] = new Seed(2, "<?php echo $a16; ?>"); if(seedNext[16]) { seedNext[16].addFeeder(seeds[16]); } </script> <td bgcolor="#CCCCCC"><?php echo $a16; ?> (<?php echo $w16a; ?> - <?php echo $l16a; ?>)</td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">8</td> <script> seeds[8] = new Seed(1, "<?php echo $a8; ?>"); if(seedNext[8]) { seedNext[8].addFeeder(seeds[8]); } </script> <td bgcolor="#CCCCCC"><?php echo $a8; ?> (<?php echo $w8a; ?> - <?php echo $l8a; ?>)</td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> <select style = "font-size : xx-small;" name="game2" align="absmiddle" onChange="games[2].push();"> <option value="-1"> </option> <option value="<?php echo a1; ?>"><?php echo a1; ?></option> <script> //alert("91"+document.theForm.game91); games[2] = new Game(2, document.theForm.game2, 2); if(seeds[8]) { games[2].addFeeder(seeds[8]); } else { seedNext[8] = games[8]; } if(gameNext[8]) { gameNext[8].addFeeder(games[8]); } if(seeds[9]) { games[2].addFeeder(seeds[9]); } else { seedNext[9] = games[2]; } if(gameNext[2]) { gameNext[2].addFeeder(games[2]); } </script> </select> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">9</td> <script> seeds[9] = new Seed(2, "<?php echo $a9; ?>"); if(seedNext[9]) { seedNext[9].addFeeder(seeds[9]); } </script> <td bgcolor="#CCCCCC"><?php echo $a9; ?> (<?php echo $w9a; ?> - <?php echo $l9a; ?>)</td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">5</td> <script> seeds[5] = new Seed(1, "<?php echo $a5; ?>"); if(seedNext[5]) { seedNext[5].addFeeder(seeds[5]); } </script> <td bgcolor="#CCCCCC"><?php echo $a5; ?> (<?php echo $w5a; ?> - <?php echo $l5a; ?>)</td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> <select style = "font-size : xx-small;" name="game4" align="absmiddle" onChange="games[4].push();"> <option value="-1"> </option> </select> <script> games[4] = new Game(4, document.theForm.game4, 1); if(seeds[5]) { games[4].addFeeder(seeds[5]); } else { seedNext[5] = games[5]; } if(gameNext[5]) { gameNext[5].addFeeder(games[5]); } if(seeds[12]) { games[4].addFeeder(seeds[12]); } else { seedNext[12] = games[4]; } if(gameNext[4]) { gameNext[4].addFeeder(games[4]); } </script> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> <select style = "font-size : xx-small;" name="game6" align="absmiddle" onChange="games[6].push();"> <option value="-1"> </option> </select> <script> games[6] = new Game(6, document.theForm.game6, 2); if(games[4]) { games[6].addFeeder(games[4]); } else { gameNext[4] = games[6]; } if(gameNext[6]) { gameNext[6].addFeeder(games[6]); } if(games[5]) { games[6].addFeeder(games[5]); } else { gameNext[5] = games[6]; } if(gameNext[6]) { gameNext[6].addFeeder(games[6]); } </script> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">12</td> <script> seeds[12] = new Seed(2, "<?php echo $a12; ?>"); if(seedNext[12]) { seedNext[12].addFeeder(seeds[12]); } </script> <td bgcolor="#CCCCCC"><?php echo $a12; ?> (<?php echo $w12a; ?> - <?php echo $l12a; ?>)</td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">4</td> <script> seeds[4] = new Seed(1, "<?php echo $a4; ?>"); if(seedNext[4]) { seedNext[4].addFeeder(seeds[4]); } </script> <td bgcolor="#CCCCCC"><?php echo $a4; ?> (<?php echo $w4a; ?> - <?php echo $l4a; ?>)</td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> <select style = "font-size : xx-small;" name="game5" align="absmiddle" onChange="games[5].push();"> <option value="-1" selected="selected"> </option> </select> <script> games[5] = new Game(5, document.theForm.game5, 2); if(seeds[4]) { games[5].addFeeder(seeds[4]); } else { seedNext[4] = games[5]; } if(gameNext[5]) { gameNext[5].addFeeder(games[5]); } if(seeds[13]) { games[5].addFeeder(seeds[13]); } else { seedNext[13] = games[5]; } if(gameNext[5]) { gameNext[5].addFeeder(games[5]); } </script> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">13</td> <script> seeds[13] = new Seed(2, "<?php echo $a13; ?>"); if(seedNext[13]) { seedNext[13].addFeeder(seeds[13]); } </script> <td bgcolor="#CCCCCC"><?php echo $a13; ?> (<?php echo $w13a; ?> - <?php echo $l13a; ?>)</td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">6</td> <td bgcolor="#CCCCCC"><?php echo $a6; ?> (<?php echo $w6a; ?> - <?php echo $l6a; ?>)</td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> <td rowspan="8" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">11</td> <td bgcolor="#CCCCCC"><?php echo $a11; ?> (<?php echo $w11a; ?> - <?php echo $l11a; ?>)</td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">3</td> <td bgcolor="#CCCCCC"><?php echo $a3; ?> (<?php echo $w3a; ?> - <?php echo $l3a; ?>)</td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">14</td> <td bgcolor="#CCCCCC"><?php echo $a14; ?> (<?php echo $w14a; ?> - <?php echo $l14a; ?>)</td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">7</td> <td bgcolor="#CCCCCC"><?php echo $a7; ?> (<?php echo $w7a; ?> - <?php echo $l7a; ?>)</td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">10</td> <td bgcolor="#CCCCCC"><?php echo $a10; ?> (<?php echo $w10a; ?> - <?php echo $l10a; ?>)</td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">2</td> <td bgcolor="#CCCCCC"><?php echo $a2; ?> (<?php echo $w2a; ?> - <?php echo $l2a; ?>)</td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">15</td> <td bgcolor="#CCCCCC"><?php echo $a15; ?> (<?php echo $w15a; ?> - <?php echo $l15a; ?>)</td> </tr> <tr> <td rowspan="16" bgcolor="#CCCCCC"> </td> <td align="center" valign="top" bgcolor="#999999">1</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> <td rowspan="8" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="16" align="center" valign="middle" bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">16</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">8</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">9</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">5</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">12</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">4</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">13</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">6</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> <td rowspan="8" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">11</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">3</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">14</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">7</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">10</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">2</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">15</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td rowspan="16" bgcolor="#CCCCCC"> </td> <td align="center" valign="top" bgcolor="#999999">1</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> <td rowspan="8" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="16" align="center" valign="middle" bgcolor="#CCCCCC"> </td> <td rowspan="32" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">16</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">8</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">9</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">5</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">12</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">4</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">13</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">6</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> <td rowspan="8" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">11</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">3</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">14</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">7</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">10</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">2</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">15</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td rowspan="16" bgcolor="#CCCCCC"> </td> <td align="center" valign="top" bgcolor="#999999">1</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> <td rowspan="8" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="16" align="center" valign="middle" bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">16</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">8</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">9</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">5</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">12</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">4</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">13</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">6</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> <td rowspan="8" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">11</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">3</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">14</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">7</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> <td rowspan="4" align="center" valign="middle" bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">10</td> <td bgcolor="#CCCCCC"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">2</td> <td bgcolor="#CCCCCC"> </td> <td rowspan="2" align="center" valign="middle" bgcolor="#999999"> </td> </tr> <tr> <td align="center" valign="top" bgcolor="#999999">15</td> <td bgcolor="#CCCCCC"> </td> </tr> </table> </form> <?php }else{ echo '<h2>Already Picked</h2> <p>You have already made your picks</p>'; } }else{ include ("../../style/include/cons/member.php"); } print '</div>'; include ("../../style/include/cons/foot.php"); ?> Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted February 20, 2008 Share Posted February 20, 2008 Use AJAX to send the user's selection to you database; that is if you don't want to reload the page; otherwise, just use PHP by itself. Quote Link to comment Share on other sites More sharing options...
Lamez Posted February 20, 2008 Author Share Posted February 20, 2008 Well I am a JS noob, and just the same as AJAX, the script works great with out reloading the page. I just do now know how to tell what the selections are when they are submitted Could you give me any example in AJAX? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted February 20, 2008 Share Posted February 20, 2008 What do you mean you don't know what the selections are when they are submitted; isn't your PHP script receiving the variables and processing them server side? Quote Link to comment Share on other sites More sharing options...
Lamez Posted February 20, 2008 Author Share Posted February 20, 2008 Well they have the variables, but I do know how to process them. I did a printf, to see what the JS was being processed, and it is: Array ( [game1] => -1 [game3] => -1 [game7] => -1 [submit] => Submit [game2] => -1 [game4] => -1 [game6] => -1 [game5] => -1 ) I do not know how to tell if the user picked Team A or Team B. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.