Page 1 of 1

Confirmation before Inserting.

Posted: Mon Oct 05, 2009 3:59 am
by rajeshverma
Hi friends,

I am quite new to the PHP world. I am not so clear how to confirm user before inserting the record .
What i mean is:
I have one customer form.
After clicking the save button it will check to the Database whether given customer name is already exist or not.
If it is already exist, then it will prompt with "The recored is already exist. Do u want to insert it".
If user click yes then it will save , otherwise it will redirect to another page.
If not exist , it will save it.


Pls help.
Thanks in advance.
Rajesh

Re: Confirmation before Inserting.

Posted: Mon Oct 05, 2009 5:47 am
by jackpf
You could either append something to the query string, or submit a form when the user confirms.

Then, check to see whether whatever you're using has been submitted. If not, prompt, if so, execute the insert statement.