Hello experts,
I am running with an app and i have some notice error while inserting records.
My form code is pasted below:
<form action="add_bk_insert.php">
Name <input type="text" name="name"/><br />
E-mail <input type="text" name="email" /><br />
Contact <input type="text" name="contact" /><br />
Requirement <input type="text" name="requirement" /><br />
<input type="submit" value="Submit" />
</form>
and my add_bk_insert.php code is as shown below:
<?php
mysql_connect("localhost","root","");
mysql_select_db("test");
$order = "INSERT INTO sal2
(name,email_id, contact,requirement)
VALUES
('$_POST[name]','$_POST[email_id]','$_POST[contact]','$_POST[requirement]')";
$result = mysql_query($order);
if($result){
echo "Inserted";
//include_once("testimonials.php");
} else{
echo("<br>Input data is fail");
}
?>
when i run the above code it shows a notice error as below:
Notice: Undefined index: name
Notice: Undefined index: email_id
Notice: Undefined index: contact
Notice: Undefined index: requirement
So i dont know what exactly i am missing. Please some one can help me out with this.
I am really stuck.