I have following codes to save record in MySql.
$insert_query = “INSERT INTO ghee (sno,pack,weight) VALUES (18,‘kk’,80)”;
$insertion_result = mysql_query($insert_query);
//check whether the data insertion was successful
die(“Sorry! Something went wrong.
Record saved successfully.”;
These codes work fine, no error. But I need some modification as
In above code these values are going to save
If I press submit button then values are written in dbf.
But if I press submit button MORE THAN ONE TIME then everytime it says:
Record saved successfully.”; [/PHP]
Before sending data to table it must check whether current SNO=18 already exist or not. If already exist then it must say:
Current SNO already exists .”; [/PHP]