rendered paste body<html>
<body>
<?php
if(isset($_POST['btnSubmit'])){
//Get values from Post values here
//Setup database
$con = mysql_connect("localhost", "root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("learning", $con);
//Set values in database
$result = mysql_query("----INSERT STATEMENT HERE----");
//Setting insert added flag
$insert_complete = TRUE;
}
?>
<?php if(isset($insert_complete)){
Insert Success. <a href="insert.php">Reset</a>
<?}else{?>
<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>
<?}?>
</body>
</html>