runnerjp Posted May 17, 2007 Share Posted May 17, 2007 i have the script where and email is sent with $url = 'http://www.runnerselite.com/activate.php?hash='.md5($password).'&stamp='.base64_encode($time); and on the account page it says UPDATE users SET status = 1 WHERE (password = "'.md5($_GET['hash']).'") AND (timestamp = '.base64_decode($_GET['time'].') but the problem is do i have to set the script to say status 0 in the registration if so how do i do it and where do i put it ? Quote Link to comment Share on other sites More sharing options...
runnerjp Posted May 17, 2007 Author Share Posted May 17, 2007 /** * addNewUser - Inserts the given (username, password, email) * info into the database. Appropriate user level is set. * Returns true on success, false otherwise. */ function addNewUser($username, $password, $email){ $time = time(); /* If admin sign up, give admin user level */ if(strcasecmp($username, ADMIN_NAME) == 0){ $ulevel = ADMIN_LEVEL; }else{ $ulevel = USER_LEVEL; } $q = "INSERT INTO ".TBL_USERS." VALUES ('$username', '$password', '0', $ulevel, '$email', $time)"; return mysql_query($q, $this->connection); } /** * updateUserField - Updates a field, specified by the field * parameter, in the user's row of the database. */ function updateUserField($username, $field, $value){ $q = "UPDATE ".TBL_USERS." SET ".$field." = '$value' WHERE username = '$username'"; return mysql_query($q, $this->connection); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.