Copy link to clipboard
Copied
When I create a dynamic registration form in Dreamweaver, I want the people who fill out the form to receive a code (random number) after they hit the submit button. How do I do this? Please help me, thanks!
Copy link to clipboard
Copied
> How do I do this? Please help me, thanks!
How you do this depends on what scripting language you are using, but you failed to mention that. And of couse, random means that two visitors could potentially have the same code - is that ok?
Copy link to clipboard
Copied
I will be using php... I want to generate a code that is unique, so each person who registers could recall their registration if they need to. Sorry for not being clear the first time.
Copy link to clipboard
Copied
In your database create a field that is auto-numerical primary key for user_id. Then when someone registers their unique ID will be the primary key field.
Copy link to clipboard
Copied
So how will I get that unique id number to show to the people who register, so they can write it down and use it later to pull up their registration information if they have to? Thanks
Copy link to clipboard
Copied
Thread moved to the Dreamweaver Application Development forum, which deals with PHP and other server-side issues.
jrollo34 wrote:
So how will I get that unique id number to show to the people who register, so they can write it down and use it later to pull up their registration information if they have to? Thanks
You don't need to. The person's name and email address should be sufficient to identify the person. However, if you really want to get it, create a recordset to retrieve the ID from the database.
SELECT user_id
FROM registrations
WHERE username = 'JoeSoap'
Copy link to clipboard
Copied
Hello Mr. Powers. I don't think I'm being clear enough. I want to create a registration form that will allow employers to register for a booth at a job fair. Once the employer fills out the registration form and hits the submit button, they will receive a registration pin number that allows them to recall their registration information and edit it if they have to, without them having to registration all over again. Hopefully I'm being clear enough, if not then I will accept the fact that I'm a dummy. lol
Copy link to clipboard
Copied
For that, you could create an id that is both unique and random. For the unique part, create a sequence number table that you increment for each user. To that, append a number you generate with a random number generator. Alternatively, you can just use their email address as their ID and create a random pin number. The pin number does not need to be unique in that case.
Copy link to clipboard
Copied
Thanks bregent, now its starting to make sense. I try that, thanks again!