PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
$pastevar =$HTTP_POST_VARS['id'];
print "$pastevar";
$winc = mysql_fetch_array( mysql_query( "select clanid1 from games_rep where id = '$pastevar'" ) );
$losc = mysql_fetch_array( mysql_query( "select clanid from games_rep where id = '$pastevar'" ) );
$plaw1 = mysql_fetch_array( mysql_query( "select win_play1 from games_rep where id = '$pastevar'" ) );
$plaw2 = mysql_fetch_array( mysql_query( "select win_play2 from games_rep where id = '$pastevar'" ) );
$plal1 = mysql_fetch_array( mysql_query( "select los_play1 from games_rep where id = '$pastevar'" ) );
$plal2 = mysql_fetch_array( mysql_query( "select los_play2 from games_rep where id = '$pastevar'" ) );
echo " $winc, $losc, $plaw1, $plaw2, $plal1, $plal2 ";
?>
$pastevar is the good number, the one I input in the previous page, but for some reason, the variables $winc, $losc, $plaw1, $plaw2, $plal1, $plal2 are all 'array'..
Anyone knows why ?
$query = mysql_query("select clanid1, clanid,
win_play1, win_play2
los_play1, los_play2
from games_rep
where id = '$pastevar'
") or die(mysql_error());
$results_array = mysql_fetch_array($query);
echo $results_array['clan_id1'];
echo $results_array['clan_id2'];
// and so forth