here is my code
Code: Select all
$pid = "10864580281";
$db = mysql_connect($dbhost, $dbuname, $dbpass);
mysql_select_db($dbname, $db);
$result = mysql_query("SELECT * FROM stats WHERE pid=$pid", $db);
while ($row = mysql_fetch_assoc($result)){
if ($pid) {
echo "Player already exists";
}
else
{
echo "Player does not exist";
}
}my code kind of works...if the pid exists it does display "Player already exists" however if it does not exist, it dosnt display anything, could someone help me as to where i am going wrong?