generating customer id's from the database

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
heshan
Forum Commoner
Posts: 26
Joined: Tue Jul 13, 2010 1:16 pm

generating customer id's from the database

Post by heshan »

Hi all,

I want some help regarding my banking project. I have a customer registration form in my project.After successfully completion of the form users have to click on the "Open Account" button.Thereafter a customer id(Auto increment value) should be generated.It was stored in the database where other form details are also being stored. How can i call to this one by one customer id's??

Heshan,
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: generating customer id's from the database

Post by superdezign »

Are you asking how to get the ID of the new customer? After inserting the data, either make use of MySQL's last insert ID (accessible via PHP's mysql_insert_id() function) or, if each user is unique in some way other than their ID, use their unique data to select their row from the database.
heshan
Forum Commoner
Posts: 26
Joined: Tue Jul 13, 2010 1:16 pm

Re: generating customer id's from the database

Post by heshan »

@ superdezign,

yeah, i want something that to be happened. Since i am new to php i cannot handle codings properly.Can you please send me the exact coding of this. I mean how the mysql_insert_id() function works?

Heshan,
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: generating customer id's from the database

Post by superdezign »

heshan wrote:Can you please send me the exact coding of this. I mean how the mysql_insert_id() function works?
Well, that was the initial purpose of providing a link...
If you want your work done for you, you've come to the wrong place. We work for money. ;)
heshan
Forum Commoner
Posts: 26
Joined: Tue Jul 13, 2010 1:16 pm

Re: generating customer id's from the database

Post by heshan »

It's ok. i will try...... :D
Post Reply