ordernumber

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
ben_albrechts
Forum Commoner
Posts: 33
Joined: Wed Oct 26, 2005 3:33 am

ordernumber

Post by ben_albrechts »

Hey , I have an order form on my website.
But I need it to appoint an ordernumber to the client.
So that in further communications we can use that ordernumber to know what we're talking about.

How do i write a program to appoint an ordernumber to a client? and to appoint a DIFFERENT number (of 1 more than the last) to the next client?

thank you
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Do you use a Database?

All databases can create sequential number fields automatically.

Code: Select all

CREATE TABLE `test` (
`ordernumber` INT NOT NULL AUTO_INCREMENT ,
INDEX ( `ordernumber` )
)
ben_albrechts
Forum Commoner
Posts: 33
Joined: Wed Oct 26, 2005 3:33 am

Post by ben_albrechts »

I dont use a database yet, i'm new to this whole thing
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

What do you use? Text files or just sessions?
ben_albrechts
Forum Commoner
Posts: 33
Joined: Wed Oct 26, 2005 3:33 am

Post by ben_albrechts »

I have a code on my site for the form and the outcome of the form is than emailed to me
Post Reply