hi, would anyone please point out why my data don't go into the database table?

it is tested successfully connected to the database and the table maapa

thanks

<?php
mysql_connect("localhost", "root", "") or die(mysql_error());
echo "successfully logged in </br>";

mysql_select_db("maapa") or die(mysql_error());
echo "successfully connected to database maapa </br>";

//extract($_REQUEST);
$pid = $_POST['pid'];
$firstName= $_POST['firstName'];
$middleName= $_POST['middleName'];
$lastName= $_POST['lastName'];
$sex= $_POST['sex'];

echo $firstName;
echo $lastName;
echo $middleName;

mysql_query("INSERT INTO person(pID, firstName, middleName, lastName) VALUES('$pid', '$firstName', '$middleName', '$lastName')");

?>

check this:

echo $qur="INSERT INTO person(pID, firstName, middleName, lastName) VALUES('$pid', '$firstName', '$middleName', '$lastName')"
mysql_query($qur);

copy and paste what it gives out into your database...
or you didn't give password at line 1...

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.