<html>
<head>
<title>Records</title>
</head>

<body>

<?php

$fname=$_POST['fname'];
$age=$_POST['age'];
$birthday=$_POST['birthday'];


$con = mysql_connect('localhost', 'root' , '');
	
if (! $con)
	{
die(mysql_error());
mysql_select_db("database" , $con) or die("Select Error: ".mysql_error());
	}	
$result=mysql_query("INSERT INTO Record (Name, Age, Birthday) VALUES (
'$fname',
'$age', 
'$birthday')") or die("Insert Error: ".mysql_error());
mysql_close($link);
print "Record added";
?>
<form method="POST" action="birthdays_insert_form.php">
<input type="submit" value="Insert Another Record">
</form>
<br>

<form method="POST" action="birthdays_dbase_interface.php">
<input type="submit" value="Dbase Interface">
</form>



</body>
</html>

Recommended Answers

All 2 Replies

Now thats fast.. Thanks sir.

Uhm im such a newbie

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.