Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to generate a registration code after a user fills out a registration form?

New Here ,
Sep 20, 2009 Sep 20, 2009

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!

TOPICS
Server side applications
2.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 20, 2009 Sep 20, 2009

> 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 20, 2009 Sep 20, 2009

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Sep 20, 2009 Sep 20, 2009

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 21, 2009 Sep 21, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 21, 2009 Sep 21, 2009

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'

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 21, 2009 Sep 21, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 21, 2009 Sep 21, 2009

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 21, 2009 Sep 21, 2009
LATEST

Thanks bregent, now its starting to make sense.  I try that, thanks again!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines