<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "ajax";
$email = $_POST['email'];
$senha = $_POST['senha'];
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = 'INSERT INTO usuarios VALUES (default,'$email','$senha')';
if ($conn->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
?>