trying to work out this points sytem, and can't seem to think straight tonight, I guess, because I just can't find the logic in my codes, maybe you can help??
Code: Select all
<?php
require('dbconnect.php');
require('check_login');
$pts = 100;
$pass = $_GET['pass'];
if($pass != "test") {
include("wrong.htm");
} else {
@mysql_query("INSERT ".$pts." FROM users WHERE points && WHERE username == ".$_SESSION['username'].") or die(mysql_error());
include("100.htm");
}
?>alright, I simplified what I'm trying to do, really what Im asking now is, is this script above going to work?? I don't want to try unless I know it will...
so what Im trying to do here, if you can't tell by the script, is check the pass a user enters, and if correct that users session var will tell the server to go to that users row, and to scan over and add the 100 points to that users points row, also, Id like to be able to check the points row, after the point add, and if that number is over lets say 1000, it would update that same users rank row to something else... can someone please help me out with this, Im horrible at sql, ... man it's confusing...
thanks in advance