I seem to having trouble with some of my PHP. It takes data from an HTML page and then adds it to a MySQL database, but the information does not appear.
<?php
// Variables
$email = $_POST["email"];
$username = $_POST["username"];
$password = $_POST["password"];
$passwordconfirmation = $_POST["passwordconfirmation"];
// Failure
if ($password !== $passwordconfirmation)
{
echo "The password fields do not match. Please enter your password again.";
}
// Success
else
{
$connection = mysqli_connect("*****.com", "*****", "*****", "charlesfriessdatabase"); // Connect
// Error Message
if (!$connection)
{
die ("Error");
}
mysqli_query("INSERT INTO accounts (email, username, password) VALUES ($email, $username, $password)"); // Inserter
mysqli_close($connection); // Connection Closer
echo "You have successfully signed up! Please check your email to confirm your account."; // Success Message
}
?>