I have this below script and mysql didn't get thru I tried to print the sql query every things is fine it's just somehow can't update my table. What's wrong?
[PHP]
# Gather all required data
$FirstName = $_POST['FirstName'];
$LastName = $_POST['LastName'];
# INSERT SQL query
$query="INSERT INTO contact (FirstName,Last Name)
VALUES (
'{$FirstName}',
'{$LastName}'
)";
echo "$query";
# Execute the INSERT QUERY
$result = mysql_query($qu ery, $dbLink) ;
if($result){
echo "Successful<BR> ";
}
else {
echo "ERROR";
}
mysql_close();
#Close the mysql connection
mysql_close($db Link);
[/PHP]
[PHP]
# Gather all required data
$FirstName = $_POST['FirstName'];
$LastName = $_POST['LastName'];
# INSERT SQL query
$query="INSERT INTO contact (FirstName,Last Name)
VALUES (
'{$FirstName}',
'{$LastName}'
)";
echo "$query";
# Execute the INSERT QUERY
$result = mysql_query($qu ery, $dbLink) ;
if($result){
echo "Successful<BR> ";
}
else {
echo "ERROR";
}
mysql_close();
#Close the mysql connection
mysql_close($db Link);
[/PHP]
Comment