Hello,
I have made a form to register users (ID, name, surname) and save the informations in a table.
The first user (user1) has an ID=1
The second (user2) ID=2
...
I would like to initialized the field ID of the form with a incrementation of the value ID (which is in the table).
///////////////FORM////////////////////
ID : 3
Name :
Surname :
Thank you
I have made a form to register users (ID, name, surname) and save the informations in a table.
The first user (user1) has an ID=1
The second (user2) ID=2
...
I would like to initialized the field ID of the form with a incrementation of the value ID (which is in the table).
///////////////FORM////////////////////
ID : 3
Name :
Surname :
Thank you
Hi neorca,
You may want to give some more though to this. What happens if two users open the form at the same time?
You could get the current highest ID with a MySQL query at the beginning of the Form HTML.
But why not use the Joomla! Registration and the Joomla! User ID that is generated?
Bob
You may want to give some more though to this. What happens if two users open the form at the same time?
You could get the current highest ID with a MySQL query at the beginning of the Form HTML.
But why not use the Joomla! Registration and the Joomla! User ID that is generated?
Bob
Thank you to your answer.
I've done a simple form as example because I need to do that for another bigest one.
That 's why I can't use the registration of Joomla.
I think the solution is to get the current highest ID with a MySQL query and to put the value in the field but my problem is how I do that ?
I've done a simple form as example because I need to do that for another bigest one.
That 's why I can't use the registration of Joomla.
I think the solution is to get the current highest ID with a MySQL query and to put the value in the field but my problem is how I do that ?
This topic is locked and no more replies can be posted.