I've recently moved my php scripts and database online using godaddy. The queries all worked great before and I had no issues. I'm wondering if I missed something in initialization or something. Here is the php script that is failing. I've hidden my username and password for obvious reasons.
<?php
$servername = "localhost";
$username = "name";
$password = "password";
$dbName = "Rules";
$name = "billy";
$email = "billy@gmail.com";
$pass = "1234";
//make a connection
$connection = new mysqli($servername, $username, $password, $dbName);
//Check the connection
if(!$connection)
{
die("Connection Failed".mysqli_connect_error());
echo "connection failed";
}
$sql = "INSERT INTO Users (username, email, password) VALUES('".$name."', '".$email."', '".$pass."')";
$result = mysqli_query($connection, $sql);
if (!$result)
{
echo "query failed";
}
?>