codeing problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
HomerTheDragoon
Forum Newbie
Posts: 21
Joined: Sat Jul 08, 2006 2:10 am

codeing problem

Post 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. :(
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

why doesnt this work?
you have a comma before your WHERE statement that shouldn't be there
Post Reply