I want to build a voucher system.

I am developing an application and want users to login from a database (preferable MS SQL). I want the DB to randomly create codes for users to top up their accounts. The codes will be unique in that they will be based on time. For example, a code like "238347428472" when allocated will be used for 10 hours. As the user is online, a counter will be checking how long the user has taken online and automatically deduct the time from the total time allocated. This process will continue until the user exhausts the entire 10 hours. If the user wants to login in again, he has to apply for another time (10, 20, 30 hours) depending on the user's choice.

Recommended Answers

You didn't ask a question. What are you having problems with.

Jump to Post

All 3 Replies

You didn't ask a question. What are you having problems with.

I want to create a voucher system like I described earlier.

That's still not a question. Are you expecting someone to write it for you? That's not going to happen. However, if you are having a problem with something specific or if you want advice on something specific then feel free to post questions. Typically a question begins with How do I.... If the user has an allocated amount of time (let's assume the amount is in minutes) then save the logon time and logoff time, get the difference in minutes and subtract it from the total. Because you posted this in the database forum I would assume this is a database issue. You didn't say. We don't know your level of ability and we haven't seen any evidence that you have done any work yourself.

Be a part of the DaniWeb community

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