This needs to be written using Sinatra and NOT PHP thanks in
advance
When user come to the gambling site, user is presented with a welcome view. Then user will have two options: logon, or sign up (sign up is optional). logon option will return a login view. The login/password information are in a database table as plain text. (this table is initialized by "sign on" option if you implement sign up otherwise, you can initialized it in IRB) If user is logged in, user is presented with a view for betting (just like the example in class except user use a form to submit bet information) You should display text showing whether the user has won or lost. Also in this view, you will also need to show two set of data: One set is on the right. These are total values during this logon session these values are 0 after login, and will be saved in session hash, Another set is on the bottom. These are total values for this user since the beginning of creating the account. After logout, you need to add the lost/win in this session to the database table, So each time the user login, you will retrieve these values from database table and display them at the bottom. The data base table is like this. username password total win total lost The logout button will clear the session and return to login page.
This needs to be written using Sinatra and NOT PHP thanks in advance
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am