Guys help me with this tried each and everything possible. created a html page in which there are four fields ID, Name, Age and location . I want to store the entered data into database when user clicks submit button. Although i am not getting any kind of error in this code but still data is not stored into the database.!
<?php
$hn = 'localhost';
$db = 'sapata_php';
$un = 'root';
$pw = '';
$conn = new mysqli($hn, $un, $pw, $db);
if ($conn->connect_error) die($conn->connect_error);
$Id = $_POST['Id'];
$Name = $_POST['name'];
$Age = $_POST['age'];
$Location = $_POST['location'];
mysql_select_db('sapata_php');
$query = "INSERT INTO 'info' ('Id', 'Name', 'Age', 'Location') VALUES ($Id, $Name, $Age, $Location)";
if(mysql_query($query))
{
echo "<script>alert('INSERTED SUCCESSFULLY');</script>";
}
else
{
echo "<script>alert('FAILED TO INSERT');</script>";
}
?>