I have a xampp database user log in with username and password, but i want to send each user an ID after registration and this ID should auto increment in my database. at the moment i can only achieve this if i include a field on the registration form, but i do not want to have a field memberID on the form it should only be visible in the database. pls could someone hellp me out

Member Avatar for LastMitch

@onofej

Can you show the table that you created? I'm not sure what you are asking.

The table should look like this:

CREATE TABLE `member` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(24) NOT NULL,
`password` varchar(24) NOT NULL,
PRIMARY KEY (id)
);
commented: thank you for your time +0

thanks, seeing your code i found out that i have to use alter table using your code doing an sql inside xampp
thanks for your time

Member Avatar for LastMitch

@onofej

Can you click MARK solve, the reason is that if someone who has the same problem as you can look at this thread and see that the correct answer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.