user forms

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
gcrest
Forum Newbie
Posts: 2
Joined: Thu Mar 01, 2012 10:19 am

user forms

Post by gcrest »

hello everyone ,
i am currently new to php and database. however i am currently undergoing some stress with a new project at hand... it goes like this....

when a user pays some money for specific number of users(say 5) at a bank he/she is given a code for a particular registration code (digits)that when used on the site will generate 5 user registration forms.

if for any number of users paid for , the registration code given should be able to open up the number of users paid for at a bank specific user forms on the websites for data entry. more also i intend producing the output in pdf format so that i can print them out on opening the database.

for n users,
registration code= n user forms..

i will be most grateful for any clue ideas or tips from anyone.. I am currently new to web development and decided to go for php
whiterainbow
Forum Newbie
Posts: 11
Joined: Fri Mar 18, 2011 9:13 am

Re: user forms

Post by whiterainbow »

I think that to get some focused help you should provide some more detail about exactly what you're looking for. If you're looking for database advice, it sounds like you'll want to have at least a users table, a licenses table and a user licenses table to contain the relation between the two.
gcrest
Forum Newbie
Posts: 2
Joined: Thu Mar 01, 2012 10:19 am

Re: user forms

Post by gcrest »

Ok fine. The page is used for getting users data.A user is given a code via sms that when used on the registration page will give acess to register a Particular number of users.If d code given is for 4 users then it shouid be able 2 register 4 users details.If d code is for 2 users then it wil be able 2 register only 2 user details
whiterainbow
Forum Newbie
Posts: 11
Joined: Fri Mar 18, 2011 9:13 am

Re: user forms

Post by whiterainbow »

Ok so for that part you'll probably want to generate a license number for them. You could do this with a salted hash of a combination of the license_id (from the table I mentioned) and one or more other fields (such as their name).

e.g. if the license_id is 5, you could use md5($salt.'5'.'John Smith') (where $salt is your salt string e.g. '098adfJARI__'). When the code is input on the registration screen, you just need to hash the license ids in the same way and see if one matches. If it does, that database record will tell you how many users that person can register. This is just one suggestion, there are other methods. In a full application you probably wouldn't want to rely on md5 and you'd likely use an encrypted string for the license number.
Post Reply