Jump to content

Freddieyanc2022

New Members
  • Posts

    2
  • Joined

  • Last visited

Freddieyanc2022's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you for your response, now let's say this is my database with 3 tables. token - id, Name, Price,. users - Id, AcctNo, Balance, Username, Fullname, Email, Password, Role. usertoken - id, AcctNo, TokenName, Amount, Quantity, Totalbuy, Interest. The table named 'token' is where products are stored and registered users can buy. On the html form I have a drop-down option, a text field labelled 'Price', 'Quantity' and 'Total' with the button 'BUY', the drop-down option is where the token's names are fetched from the database, when a user selects a particular token he wants to buy and the price will display in the Price text field then the user will input the quantity in the Quantity text field and it will auto calculate in the Total text field, now, after the user clicks on buy button the system will calculate a 3 percent interest as a discount from the Totalbuy for the user this value will be stored in the 'Interest' column on the usertoken table. When user submits form, system will check if user has enough fund in his 'Balance' else displays error of 'not enough fund'.
  2. Hi there, am building a project, I have this page where users can buy a token from the site. When buying the token you will have to select the token name from the drop down option that fetched from the database, after selecting a name the price of the selected option will display in the text field, user will input their qualities and the total will auto calculate and display in the input field. I have userbuy, usersell, Token, as my table names In the database, the table name 'Token' is where users can buy the tokens from and the table has, Id, NameofToken, Price. In the userbuy table I have Id, TokenName, Amount, Quantity, Totalbuy, Image, Interest. After the user clicks on buy button the system will calculate a 3 percent interest from the Totalbuy for the user and insert it into the Interest column in the table, the order will go through if user has enough fund in his account else displays error of 'not enough fund'. This is how I want the page backend to work. Please if you understand my problem, I just need an example working code to follow and do mine. Please any solution?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.