Hi..
im creating a football site and a person when they register pick 11 players... now i want a couple of rules to make it hard
one being that no more that 2 players from any one team..
any ideas how to go about this?? don't like the idea of arrays as i am weak at them!
was thinking something along this lines but im stuck!
<?PHP
$query1=mysql_query("select p_team from players where p_id = '$player1'");
$row = mysql_fetch_array($query1);
$arsenal = arsenal
$arsenal = $ars
$ars ="0";
$ast ="0";
$bir ="0";
$bla ="0";
$bol ="0";
$cha ="0";
$che ="0";
$eve ="0";
$ful ="0";
$lee ="0";
$liv ="0";
$mc ="0";
$mu ="0";
$mid ="0";
$new ="0";
$sot ="0";
$sun ="0";
$tot ="0";
$wba ="0";
$wh ="0";
$query1=mysql_query("select p_team from players where p_name = '$player1'");
$row = mysql_fetch_array($query1);
while($row != 0)
{
$___++
// get team for player1
// and increment it.
// if team >2
// error
// else continue
//
?>
any suggestions???
really appreciate it!
ive a deadline of 2moro so very worried!!!!