Hi
I have a flash game with a scoreboard. Users are submitting rude player names(pname). I wish to stop this and have created a new table called 'bannedNames'. The idea is to see if 'pname' appears on this list, and if so I would like to either make their score zero or, if I knew how to do it just delete the submission. I have the following code and scores appear on the board as long as the 'IF' statement is not included. As soon as I put it in, the scoreboard is blank.
Is my syntax wrong please?
THANKS
<?php
$table="x8tablesTEST";
$user="root";
$conn=mysql_connect("mysql13.hostexcellence.com","santon_public","myscore")or die("err:conn");
$self=$_SERVER['PHP_SELF'];
$pname=$_REQUEST['pname'];
$score=$_REQUEST['score'];
$rs=mysql_select_db("santon_scores",$conn)or die("err:db2");
$sql="select * from bannedNames where banned ==\"$pname\"";
$rs=mysql_query($sql,$conn);
$num=mysql_num_rows($rs);
if($num != 0){$score="0"};
$sql="insert into $table (pname,score)values(\"$pname\",$score)";
$rs=mysql_query($sql,$conn);
$sql="select pname,score,tdate from $table order by score desc limit 10";
$rs= mysql_query($sql,$conn);
$num= mysql_num_rows($rs);
// FLASH DATA CREATED HERE
for($i=0;$i<$num;$i++)
{echo ("pname" . $i . "=");
echo (mysql_result ($rs,$i,"pname"));
echo ("&score" . $i . "=");
echo (mysql_result ($rs,$i,"score"));
echo ("&");
}
mysql_close();
?>