Hi everyone. What I am trying to do is create a system that ultimately grabs information from a mysql table and allow me to update it.
Currently, I have created a form in a while-loop that sets up the user-interface. I am right now trying to get it to post to a separate page, and from there output only the row that does not have equal fields where the user can input information. This is the beginning step to test to make sure everything is posting correctly.
The 2 web pages are:
http://scilfball.com/submit/scores/submitscore.php
http://scilfball.com/submit/scores/scresults.php
Submit Score code looks like this:
{database info here}
GameID | Date | Away | Away Score | Home | Home Score |
---|---|---|---|---|---|
<? echo '';?> | <? echo '';?> | <? echo '';?> | <? echo '';?> | <? echo '';?> | <? echo '';?> |
?>
<? mysql_close(); ?>
scresults.php looks like this:
{database info}
$ascore[]=array();
$hscore[]=array();
$dtarray[]=array();
$gidarray[]=array();
$harray[]=array();
$aarray[]=array();
for ($x=0; $x<$num; $x++) {
$ascore[$x]=($_POST["asc_'.$x.'"]);
$hscore[$x]=($_POST["hsc_'.$x.'"]);
$dtarray[$x]=($_POST["dt_'.$x.'"]);
$gidarray[$x]=($_POST["gid_'.$x.'"]);
$aarray[$x]=($_POST["aw_'.$x.'"]);
$harray[$x]=($_POST["hm_'.$x.'"]);
echo $gidarray[$x].'<br>'.$dtarray[$x].'<br>'.$haarray[$x]." ".$hscore[$x].'<br>'.$aarray[$x]." ".$ascore[$x].'<br><br>';
}
for ($y=0; $y<$num; $y++) {
if ($ascore[$x] == $hscore[$x]) {
print_r ($gidarray[$x]);
echo '<br>';
}
}
mysql_close(); ?>
My scresults.php shows up blank. If you have any suggestions, I am all ears.
Thanks in advance,
Joe