spick
12-10-2004, 11:27 PM
hey i got a question
i am creating a vB3 battle system
im stuck on this problem i created a textfield with the name="winner"
and in my newreply.php i used the code
// update battles
$winid = $DB_site->query_first("SELECT username FROM ".TABLE_PREFIX."user WHERE userid='$winner'");
if ($winid['username'] > 0)
{
$DB_site->query("UPDATE ".TABLE_PREFIX."user SET wins=wins+1 WHERE username='$winid[username]'");
}
// end of battle update
but it does nuthing and i tried more codes but dont seem to work can any body help me??
i am creating a vB3 battle system
im stuck on this problem i created a textfield with the name="winner"
and in my newreply.php i used the code
// update battles
$winid = $DB_site->query_first("SELECT username FROM ".TABLE_PREFIX."user WHERE userid='$winner'");
if ($winid['username'] > 0)
{
$DB_site->query("UPDATE ".TABLE_PREFIX."user SET wins=wins+1 WHERE username='$winid[username]'");
}
// end of battle update
but it does nuthing and i tried more codes but dont seem to work can any body help me??