Hey all can anybody decipher whats wrong with this simple code. The $username variable is passed from the page before. It doesn't update points and it doesn't detect name which are not in the database.
<?php
include("connectdb.inc.php");
$getinfo=mysql_query("select * from hitlist where username='$username' ");
while ($row=mysql_fetch_array($getinfo))
{
if ($row[username]=="NULL") { print "$row[username]"; }
}
mysql_query("delete from hitlist where username='$username' ");
$getpoints=mysql_query("select * from outwarinfo where outwarusername='username' ") or die("Sorry2");
while ($row=mysql_fetch_array($getpoints))
{
$points=$row[points]-100;
}
mysql_query("update outwarinfo set points='$points' where outwarusername='username'") or die ("sorry");
?>