Yes, I am a newbie, and I'm sure someone has a simple answer... My formatting is terrible, and I apologize.
Here is my problem. Can't seem to get the value of the radio buttons to post. Here is where I get frustrated... I know it must be something simple. If I echo the $theid, they are the correct numbers. I am assuming that the problem is in my SQL statement in the process.php but, thats why I'm here. Here is part of the code from the 'for' loop. I receive no errors. It just doesn't update the 'pick' to a 'A' or 'H' in the database.
<input name="pick[<? echo "$theid" ?>]" type="radio" value="A">
<?
echo "$theawayteam";
echo " @ ";
echo "$thehometeam";
?>
<input name="pick[<? echo "$theid" ?>]" type="radio" value="H">
<?
echo " $thevalue ";
?>
<br>
<br>
<?
}
// Find first and last games ID numbers for week.
$thestart =($theid+1)-$num_rows1;
$theend = ($theid);
//echo "$thestart ";
//echo " $theend";
?>
<input type="hidden" name="subnflpicks" value="1">
<input type="submit" name="nflpicks" value="Submit picks" />
</form>
<?
Then in my 'process.php' I have:
/* Pick submission attempt */
for ($d=$_POST[$thestart]; $d<$_POST[$theend]; $d++) {
# setup SQL statement
$sql = "UPDATE nflpicks SET pick=$_POST[pick][$d] WHERE game =$d AND user = ('$session->username')";
#execute SQL statement
mysql_query($sql);
}
header("Location: ".$session->referrer);
}
Again, I apologize for the terrible formatting. Any help someone can give me would be greatly appreciated!