Error! User $username already exists

"; print "

Back to Input Form

"; return false; } return true; } function addUser() { if(isset($_POST['isadmin'])) $isAdmin='true'; else $isAdmin='false'; $username = $_REQUEST['username']; $password = $_REQUEST['password']; $fullname = $_REQUEST['fullname']; $query = "INSERT INTO User_T(username, passwd, fullName, isAdmin) VALUES('$username', SHA('$password'), '$fullname', $isAdmin)"; $result = mysql_query($query); if($result) print "

User $username successfully added

"; else print "

Error! Adding user $username failed

"; print "

Back to Input Form

"; } if(validUser()) addUser(); ?>