I'm not sure if I need to use arrays or if I can do this with variables. I have a working score reporting system that has 20 entry lines hard-coded to record entries. I'm trying to change this up and make it flexible.
Basically I need to output a form:
Team A1 - Score A1 - Team A2 - Score A2
Team B1 - Score B1 - Team B2 - Score B2
Then I need to read these variables and store them in the database.
Right now I'm okay on the form page, but if this is wrong tell me. I am looping through my MySQL database and writing this out:
<input type="hidden" name="<?php echo "home_team_" . $i; ?>" value=<?php echo $info[0]; ?> />
Seems to work.
My problem is on the receiving end I'm not sure how to loop thru to receive these variables. Right now I'm hard-coding it:
if ( $_POST[home_team_1] ) {