Page 1 of 1

codeing problem

Posted: Sat Jul 22, 2006 11:19 pm
by HomerTheDragoon
why doesnt this work?

Code: Select all

if ($mode=="editplayer" && is_admin($admin)){
$losses=$_POST['losses'];
$wins=$_POST['wins'];
$player=$_POST['playername'];
if ($_POST['location']="nochange"){$location=$_POST['oldlocation'];} else {$location=$_POST['location'];}
if ($_POST['race']="nochange"){$race=$_POST['oldrace'];} else {$race=$_POST['race'];}
$id=$_POST['id'];
$clan=$_POST['clan'];
$query="UPDATE leaguestats_$clan SET player='$player', location='$location', wins='$wins', losses='$losses', race='$race', WHERE id='$id'";
mysql_query($query);

}
Ive even tried putting preplaced values in. :(

Posted: Sat Jul 22, 2006 11:27 pm
by Weirdan
why doesnt this work?
you have a comma before your WHERE statement that shouldn't be there