execute_query("SELECT username FROM $table WHERE username = ?", array($username)); $query = "INSERT INTO $table SET `username` = ?, `password` = ?, `email` = ?"; if ($found && $found->fetch_assoc()) { $exists = TRUE; } else if ($result = $db->execute_query($query, array($username, $password, $email))) { // If the password column cut the hash short, the editor could never log in if (password_hash_is_stored($username, $password)) { $added = TRUE; } else { $db->execute_query("DELETE FROM $table WHERE username = ?", array($username)); $hash_failed = TRUE; } $is_admin = TRUE; } open_db('close'); } ?> x.x.x [add editor]

add editor

Added editor

Your session has expired. Please try again.

An editor with that username already exists.

The editor was not added: the editors.password column is too short for the password hash. Widen it to VARCHAR(255).

" method="post">