Create an account
Let's get you all setup, so you can verify your personal account and begin setting up your profile.
connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Retrieve and sanitize input
$usernames = $conn->real_escape_string($_POST['usernames']);
$emails = $conn->real_escape_string($_POST['emails']);
$passwords = password_hash($conn->real_escape_string($_POST['passwords']), PASSWORD_DEFAULT);
$status = 'inactive'; // default status
// Insert data into the database
$sql = "INSERT INTO user (usernames, emails, passwords, status) VALUES ('$usernames', '$emails', '$passwords', '$status')";
if ($conn->query($sql) === TRUE) {
echo "
New record created successfully
";
header("Refresh: 1; url=login.php");
} else {
echo "
Error: " . $sql . "
" . $conn->error . "
";
}
$conn->close();
}
?>
Already have an account?
Login