Weird...why won't it work?
Posted: Mon Mar 01, 2004 3:03 pm
Code: Select all
<?php
$query = "SELECT lastgame FROM ldu_users WHERE user_name = '".$_POST['winner']."'";
$result = MySQL_query($query);
While( $rows = MySQL_fetch_array($result) ) {
$lg = $rows['lastgame'];
if ($lg = $_POST['loser']){
echo "<br>The last game you played was against this person. This game does not count!";
}else{
MySQL_query("UPDATE ldu_users SET lastgame = '".$_POST['winner']."' WHERE user_name = '".$_POST['loser']."'");
MySQL_query("UPDATE ldu_users SET lastgame = '".$_POST['loser']."' WHERE user_name = '".$_POST['winner']."'");
}
}
?>All it says is that the game was against this person. It doesn't count. When really in the database, that's wrong