I had written a php code and used apache to link it to database but the data won't enter into the table. Can anyone help??
I tried to create a dynamic website where values would be entered in the database [text]
<?php
$con=mysqli_connect("localhost","root");
if($con){
echo "Connection Successful";
}
else
{
echo "No Connection";
}
mysqli_select_db($con,"project");
$user=$_POST['user'];
$email=$_POST['email'];
$mobile=$_POST['mobile'];
$comments=$_POST['comments'];
$query="insert into projectinfodata('User','Email','Mobile','Comments') values('$user','$email','$mobile','$comments')";
mysqli_query($con,$query);
header("location:index.php");
?>
i wrote this code but it didn't work