Hi, when I try to access my php file I get 2 warnings:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /disk3/daniel/public_html/client/test.php on line 8 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /disk3/daniel/public_html/client/test.php on line 36
My test.php file:
<?php include "mysql.php"; $playername = $_GET["player"]; $query = mysql_query("SELECT * FROM skills WHERE playerName = '".$playername."'"); $query2 = mysql_query("SELECT * FROM skillsoverall WHERE playerName = '".$playername."'"); while($row = mysql_fetch_array($query)){ echo($row['playerName']); echo(" " . $row['Attacklvl']); echo(" " . $row['Strengthlvl']); echo(" " . $row['Defencelvl']); echo(" " . $row['Rangelvl']); echo(" " . $row['Prayerlvl']); echo(" " . $row['Magiclvl']); echo(" " . $row['Runecraftlvl']); echo(" " . $row['Constructionlvl']); echo(" " . $row['Dungeoneeringlvl']); echo(" " . $row['Hitpointslvl']); echo(" " . $row['Agilitylvl']); echo(" " . $row['Herblorelvl']); echo(" " . $row['Thievinglvl']); echo(" " . $row['Craftinglvl']); echo(" " . $row['Fletchinglvl']); echo(" " . $row['Slayerlvl']); echo(" " . $row['Hunterlvl']); echo(" " . $row['Mininglvl']); echo(" " . $row['Smithinglvl']); echo(" " . $row['Fishinglvl']); echo(" " . $row['Cookinglvl']); echo(" " . $row['Firemakinglvl']); echo(" " . $row['Woodcuttinglvl']); echo(" " . $row['Farminglvl']); echo(" " . $row['Summoninglvl']); } while($row = mysql_fetch_array($query2)){ echo(" " . $row['kills']); echo(" " . $row['deaths']); } ?>
How can I fix this?