Regarding my previous post:
http://www.daniweb.com/forums/thread326976.html
I manage to correct that error.
Now my problem is the misplacement of records on my fields.
Records that suppose to be in the Region field now displays at the Name field.
Records that should be on the Zipcode field now at the Age field.
Records that should be on CPnumber field now displays at the Birthday field.
It does displays the record though.
Just dont know why i have this misplacement error in displaying the fields.
<html>
<head>
<title>Record Entry</title>
</head>
<body>
<center>
<br><br>
<br><br>
<br><br>
<br><br>
<b>
<?php
// $sample = isset($_POST['sample']) ? $_POST["sample"] : "";
$fname=isset($_POST['fname']) ? $_POST["fname"] : "";
$age=isset($_POST['age']) ? $_POST["age"] : "";
$birthday=isset($_POST['birthday']) ? $_POST["birthday"] : "";
$address=isset($_POST['address']) ? $_POST["address"] : "";
$status=isset($_POST['status']) ? $_POST["status"] : "";
$religion=isset($_POST['religion']) ? $_POST["religion"] : "";
$region=isset($_POST['region']) ? $_POST["region"] : "";
$zipcode=isset($_POST['zipcode']) ? $_POST["zipcode"] : "";
$cpnumber=isset($_POST['cpnumber']) ? $_POST["cpnumber"] : "";
$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, Address, Status, Religion, Region, ZipCode, CPNumber) VALUES (
'$fname',
'$age',
'$birthday',
'$address',
'$status',
'$religion',
'$region',
'$zipcode',
'$cpnumber')") or die("Insert Error: ".mysql_error());
mysql_close($con);
/* Database Connection Ends */
print "Record successfully added.";
?>
<br><br>
<form method="POST" action="Insertform.php">
<input type="submit" value="Insert Another Record">
</form>
<br><br>
<form method="POST" action="index.php">
<input type="submit" value="Back to Main Menu">
</form>
</center>
</body>
</html>