execute($sql, [$username]); if ($existing && count($existing) > 0) { $errors[] = 'Username already exists'; } } // Create user if no errors if (empty($errors)) { $user_key = rand(100000, 999999); $sql = "INSERT INTO db_accountuser (usr_user, usr_email, usr_password, usr_verified, usr_joindate, usr_active, usr_key) VALUES (?, ?, MD5(?), 1, NOW(), 1, ?)"; $result = $class_database->execute($sql, [$username, $email, $password, $user_key]); if ($result) { $success = 'Account created successfully! You can now sign in.'; } else { $errors[] = 'Registration failed. Please try again.'; } } } ?> Register - EasyStream

Create Account