Report.

$rankoldloser) { $difference = $rankoldwinner - $rankoldloser; $rise = round($difference/2); $ranknewwinner = $rankoldwinner - $rise; $ranknewloser = $rankoldloser; if ($ranknewwinner == $ranknewloser) { $ranknewloser++; } $sql = "UPDATE $playerstable SET rank = rank + 1 WHERE rank > $ranknewwinner - 1 AND rank < $rankoldwinner"; $result = mysql_query($sql); } else if ($rankoldwinner == $rankoldloser) { $ranknewwinner = $rankoldwinner; $ranknewloser = $rankoldloser + 1; } else { $ranknewwinner = $rankoldwinner; $ranknewloser = $rankoldloser; } $sql = "UPDATE $playerstable SET wins = wins, losses = losses + 1, totalwins = totalwins, totallosses = totallosses + 1, points = points + $pointsloss, totalpoints = totalpoints + $pointsloss, games = games + 1, totalgames = totalgames + 1, streakwins = 0, streaklosses = streaklosses + 1, rating = rating - $ratingdifferent, rank = $ranknewloser WHERE name='$_POST[losername]'"; $result = mysql_query($sql); $sql = "UPDATE $playerstable SET wins = wins + 1, losses = losses, totalwins = totalwins + 1, totallosses= totallosses, points = points + $pointswin, totalpoints = totalpoints + $pointswin, games = games + 1, totalgames = totalgames + 1, streakwins = streakwins + 1, streaklosses = 0, rating = rating + $ratingdifferent, rank = $ranknewwinner WHERE name='$_POST[winnername]'"; $result = mysql_query($sql); $sql = "INSERT INTO $gamestable (winner, loser, date, recorded) VALUES ('$_POST[winnername]', '$_POST[losername]', '$date', 'yes')"; $result = mysql_query($sql); } else { $sql = "INSERT INTO $gamestable (winner, loser, date, recorded) VALUES ('$_POST[winnername]', '$_POST[losername]', '$date', 'no')"; $result = mysql_query($sql); } echo "Thank you! Information entered."; } } else { echo "You can't play more than $gamesmaxdayplayer games a day against the same player."; } } else { echo "Incorrect password. Try again."; } } else { ?>

Winner:

Loser:

Password:

; border: 1 solid " class="text">

; border: 1 solid " class="text">