I have been developing a website form on localhost (xampp). But it only showing single input from a user (on PHPMyAdmin). And is accepting all the inputs from the user without showing any error. Already have tried all the valid solutions provided online. Any help would be really appreciated. Have been stuck on this issue for +2 months.
Here is the php+mysqli code I have been using:
<?php
$con = mysqli_connect('localhost','root');
if($con){
echo "Connection Successful";
} else {
echo "No Connection";
}
mysqli_select_db($con, 'animatesite');
$user = $_POST['user'];
$email = $_POST['email'];
$mobile = $_POST['mobile'];
$comments = $_POST['comments'];
$query = "insert into userinfodata (user, email, mobile, comment)
values ('$user', '$email', '$mobile', '$comments')";
mysqli_query($con, $query);
echo "$query";
header('location:index.php');
?>