Confirmation before Inserting.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rajeshverma
Forum Newbie
Posts: 1
Joined: Mon Oct 05, 2009 3:50 am

Confirmation before Inserting.

Post 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
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Confirmation before Inserting.

Post 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.
Post Reply