I am trying to insert a record into my db, but it does'nt show the entered record.
<form method ="POST">
<input type = "text" name = "add" maxlength="50"><br>
<input type = "submit" value = "add"><br>
</form>
<?php
//Database Connection Details
$username = "SYSDBA";
$password = "masterkey";
$connection = @ibase_connect('localhost:C:\web\MyDATABASE.GDB', $username, $password);
if (!$connection)
{
exit ("Unable to connect to database: $connection");
}
//if the text field wasnt blank enter data
if($add)
{
//insert the text box data into the Customer table
$sql_query = "INSERT INTO TBL_CUSTOMERS('CUSTOMER_NAME') VALUES ('$add')";
$result = ($sql_query);
//display the entered data
echo "You entered the following info " . $add;
}
//if it was blank display a message
else
{
echo ("you didnt enter any data");
}
?>
It echo's the data i entere but it is not inserting into my db.what is the error?I hope some body would help me in order to fix it.
thank you