rendered paste body<html>
<body>
<?php
if(isset($_POST['btnSubmit'])){
}
?>
<form action="insert.php" method="post">
Name: <input type="text" name="name" />
Email: <input type="text" name="email" />
Age: <input type="int" name="age" />
<input type="submit" />
</form>
<?php
$con = mysql_connect("localhost", "root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("learning", $con);
$result = mysql_query("SELECT * FROM persons");
while($row = mysql_fetch_array($result))
{
echo $row['name'] . " " . $row['age'];
echo "<br />";
}
?>
</body>
</html>