I am using the below code to enter data into my DB but there is no error generated even the data is not inserting in db. Please help me
<?php
$dbhost = "localhost";
$dbuser = "root";
$dbpassword = "root";
$conn = mysqli_connect($dbhost, $dbuser, $dbpassword);
if(! $conn )
{
die('Could not connect: ' . mysqli_error());
}
$post_enroll = $_POST['enroll'];
$post_mobile = $_POST['mobile'];
$post_email = $_POST['email'];
$post_password = $_POST['password'];
$sql = "INSERT INTO login (enroll, mobile, email, password) VALUES ('".$post_enroll."','".$post_mobile."','".$post_email."','".$post_password."')";
mysqli_select_db('rgpv');
$retval = mysqli_query( $sql, $conn );
if(! $retval )
{
die('Could not enter data: ' . mysqli_error());
}
mysqli_close($conn);
?>