I get HTTP ERROR 500 when I have my code configured like this:
$orderid = $_POST['OrderID'];
$email = $_POST['Buyer-Email'];
$warranty = $_POST['Warranty'];
$quantity = $_POST['Quantity'];
$subscription = $_POST['Subscription'];
$country = $_POST['Country'];
$product = $_POST['Product'];
$price = $_POST['Price'];
$type = $_POST['Type'];
$login = $_POST['Details-Email'];
$date = date("m/d/Y h:i:s a", time());
$sql = "INSERT INTO orders (orderid,email,product,warranty,quantity,country,subscription,price,time,type,logindetails) VALUES ('$orderid','$email','$product','$warranty','$quantity','$country','$subscription','$price','$date','$type','$login')";
if ($conn->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
And the database is set up like this:
I'm guessing I've misconfigured my database somehow. What am I doing wrong?
Edit: I was able to enable error messages with:
error_reporting(E_ALL);
ini_set('display_errors', 'On');
And I typed "conn" instead of "con"....