Error in properties and functions [duplicate]

On the server side, I do this:

$row = mysql_fetch_array("SELECT img,name,life,atk,def,exp,type FROM pokemon WHERE id_pok = '".$_GET['startpoke']."'")  or die('Error:'.mysql_error());

and I get this error:

Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in C:xampphtdocsstyleregister.php

Please tell me what is wrong.


Answer 1, authority 100%

First, you need to execute sql (execute) and then pull out the result of the selection from it, which is what you are told in the error message..

$res = mysql_query("SELECT img,name,life,atk,def,exp,type FROM pokemon WHERE id_pok = '".$_GET['startpoke']."'")  or die('Error:'.mysql_error());
while($row = mysql_fetch_array($res))
{
  print_r($row);
}