the asp page and finally i should update the database.
Ah, you're using a database! Eureka! Now, what kind? Access, SQL Server,
MySQL, Oracle, dBase, FoxPro, Excel, ...?
Depending on what other information you are storing, the typical design is
something like this:
CREATE TABLE dbo.Customers
(
CustomerID INT PRIMARY KEY,
FirstName VARCHAR(32),
LastName VARCHAR(32),
...
)
CREATE TABLE dbo.CustomerAddresses
(
CustomerID INT NOT NULL FOREIGN KEY
REFERENCES dbo.Customers(CustomerID),
Address1 VARCHAR(64),
Address2 VARCHAR(64),
City VARCHAR(32),
-- State, Zip, Country, Phone
-- implementation depends on location,
-- customer base and requirements
Type TINYINT -- e.g. Home, Work, Primary, etc.
)
I've left other things out, such as indexes and constraints. But basically
this allows you to have customer data stored once, and 0, 1, or multiple
addresses stored for each customer.
A