dude32 Posted February 22, 2007 Share Posted February 22, 2007 All of my table data prints the number 1 on either side of it ex: 1TEAM1? filename: form.html <code> <html><head><title>This is the NFL</title></head> <body> <!--- <form action='nfl.php' method='post'> <b>Make a choice below to view the entire league, a conference or division.</b><br> <select name='ean'> <option value='all'>Entire NFL</option> <option value='afc'>AFC</option> <option value='nfc'>NFC</option> </select> <input type='submit' value='Submit'> </form> <br> !--> <form action="nfl.php" method="post"> <br> <br> <select name='nsew'> <option value='all'>Entire NFL</option> <option value='afc'>AFC</option> <option value='nfc'>NFC</option> <option value='nfc'>____________</option> <option value='nfcn'>NFC North</option> <option value='nfcs'>NFC South</option> <option value='nfce'>NFC East</option> <option value='nfcw'>NFC West</option> <option value='afc'>____________</option> <option value='afcn'>AFC North</option> <option value='afcs'>AFC South</option> <option value='afce'>AFC East</option> <option value='afcw'>AFC West</option> </select> <br> <br> <input type='submit' value='Submit'> </form> <br> </body></html> </code> file name: nfl.php <code> <html> <?php $NFL = array(); $NFL[0] = "NFC"; $NFL[1] = "AFC"; $NFC = array(); $NFC[0] = "North"; $NFC[1] = "South"; $NFC[2] = "East"; $NFC[3] = "West"; $NFCNORTH = array(); $NFCNORTH[0] = "Chicago Bears"; $NFCNORTH[1] = "Detroit Lions"; $NFCNORTH[2] = "Green Bay Packers"; $NFCNORTH[3] = "Minnesota Vikings"; $NFCSOUTH = array(); $NFCSOUTH[0] = "Atlanta Falcons"; $NFCSOUTH[1] = "Carolina Panthers"; $NFCSOUTH[2] = "New Orleans Saints"; $NFCSOUTH[3] = "Tampa Bay Buccaneers"; $NFCEAST = array(); $NFCEAST[0] = "Dallas Cowboys"; $NFCEAST[1] = "New York Giants"; $NFCEAST[2] = "Philedelphia Eagles"; $NFCEAST[3] = "Washington Redskins"; $NFCWEST = array(); $NFCWEST[0] = "Arizona Cardinals"; $NFCWEST[1] = "St Louis Rams"; $NFCWEST[2] = "SanFrancisco 49ers"; $NFCWEST[3] = "Seattle Seahawks"; $AFC = array(); $AFC[0] = "North"; $AFC[1] = "South"; $AFC[2] = "East"; $AFC[3] = "West"; $AFCNORTH = array(); $AFCNORTH[0] = "Baltimore Ravens"; $AFCNORTH[1] = "Cincinnati Bengals"; $AFCNORTH[2] = "Cleveland Browns"; $AFCNORTH[3] = "Pittsburgh Steelers"; $AFCSOUTH = array(); $AFCSOUTH[0] = "Houston Texans"; $AFCSOUTH[1] = "Indianapolis Colts"; $AFCSOUTH[2] = "Jacksonville Jaguars"; $AFCSOUTH[3] = "Tennessee Titans"; $AFCEAST = array(); $AFCEAST[0] = "Buffalo Bills"; $AFCEAST[1] = "Miami Dolphins"; $AFCEAST[2] = "New England Patriots"; $AFCEAST[3] = "New York Jets"; $AFCWEST = array(); $AFCWEST[0] = "Denver Broncos"; $AFCWEST[1] = "Kansas City Chiefs"; $AFCWEST[2] = "Oakland Raiders"; $AFCWEST[3] = "San Diego Chargers"; /*echo "<center>"; echo "<u><h1>NFL</h1></u>"; echo "<br>"; echo print_r($NFL); echo "<br>"; echo "<h2>NFC</h2>"; echo print_r($NFC); echo "<br>"; echo print_r($NFCNORTH); echo "<br>"; echo print_r($NFCSOUTH); echo "<br>"; echo print_r($NFCEAST); echo "<br>"; echo print_r($NFCWEST); echo "<br>"; echo "<br>"; echo "<h2>AFC</h2>"; echo print_r($AFC); echo "<br>"; echo print_r($AFCNORTH); echo "<br>"; echo print_r($AFCSOUTH); echo "<br>"; echo print_r($AFCEAST); echo "<br>"; echo print_r($AFCWEST); echo "<br>"; echo "</center>"; */ /* if($_POST) //If form was submitted { $ean = $_POST['ean']; //This will be the 'action' variable that tells us what we need to do. $s = '"Holy Cow Batman!"'; //This will be the string variable that holds the string we will manipulate. if(!$s) { $s = '<i>(no data)</i>'; } switch($ean) //Make a switch to handle what action we get { case "all": echo print_r($NFL); break; case "afc": echo print_r($AFC); break; case "nfc": echo print_r($NFC); break; default: die("Invalid selection."); break; } } { */ echo '<table border="2"><tr></tr>' ; //BEGIN TABLE if($_POST) //If form was submitted { $nsew = $_POST['nsew']; switch($nsew) //Make a switch to handle what action we get { case "all": echo print_r($NFL); break; case "afc": echo print_r($AFC); break; case "nfc": echo print_r($NFC); break; case "nfcn": echo print_r($NFCNORTH); break; case "nfcs": echo print_r($NFCSOUTH); break; case "nfce": echo print_r($NFCEAST); break; case "nfcw": echo print_r($NFCWEST); break; case "afcn": echo print '<tr><td>'; echo print ($AFCNORTH [0]); echo print '</td></tr>'; echo print '<tr><td>'; echo print ($AFCNORTH [1]); echo print '</td></tr>'; echo print '<tr><td>'; echo print ($AFCNORTH [2]); echo print '</td></tr>'; echo print '<tr><td>'; echo print ($AFCNORTH [3]); echo print '</td></tr>'; break; case "afcs": echo print ($AFCSOUTH [0]), ($AFCSOUTH [1]),($AFCSOUTH [2]),($AFCSOUTH [3]); break; case "afce": echo print ($AFCEAST); break; case "afcw": echo print_r($AFCWEST); break; default: die("Invalid selection."); break; } } echo '</table>'; // TABLE END! ?> </html> </code> Link to comment https://forums.phpfreaks.com/topic/39577-why-are-1s-printing-out-in-my-html-tables/ Share on other sites More sharing options...
dude32 Posted February 22, 2007 Author Share Posted February 22, 2007 I know I'm a tool but please god help me!! ??? Link to comment https://forums.phpfreaks.com/topic/39577-why-are-1s-printing-out-in-my-html-tables/#findComment-190958 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.