I have started learning php and just got stuck in forms part,i am not able to insert data into the database.With phpmyadmin running on port 80 and everything working fine.Please help. Here is the fellow.php code
<?php
$dbc=mysqli_connect('127.0.0.1','root','','abhishek')
or die("error connecting to the databsase");
$nama=$_POST['hell'];
$nanu=$_POST['email'];
print $nama;
$ab="INSERT INTO attempt('name','email')VALUES('$nama','$nanu')";
if(mysqli_query($dbc,$ab)) {
echo "Records added successfully.";
}
else {
echo "Records not added successfully.";
}
mysqli_close($dbc);
?>
And here is the first.html code-
<html>
<head>
<title>first attempt</title>
</head>
<body>
<form action="fellow.php" method="post" >
Name:
<input type="text" name="hell" id="hell" value="hell">
Email
<input type="text" name="email" id="email" value="email">
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>
Please help as i am not able to proceed futher