I have a script which receives a list of variables from a form numbered in sequence, i.e. player1, player2, player3 etc. I was hoping to be able to do something like this with it :
for ($x=1; $x < $totalplayers; $x++)
{
$sql2="UPDATE Squad SET Games=Games+1 WHERE Surname='$player$x' ";
$result2 = mysql_query($sql2) or die("Invalid Query 2");
}
I was hoping that the Surname='$player$x' bit would produce something like Surname=$player1, but it doesn't seem to.
Is there a way of doing this?
Thanks