Error in server side registration [duplicate]

On the server side, I have this code:

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

And you give me this error:

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

Please tell me what to do =)


Answer 1, authority 100%

$query = mysql_query("SELECT img,name,life,atk,def,exp,type FROM pokemon WHERE id_pok = '".$_GET['startpoke']."'")  or die ('Error:'.mysql_error());
if(mysql_fetch_row($query) < 1)
{
  echo '  ';
}
if($row = mysql_fetch_array($query))
  echo $row['img'];
  //  ..
}

Answer 2

Most likely it should be like this:

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