Jump to content

Updating and keeping database


T3ngu

Recommended Posts

Not sure if this is the correct place to post, but here it goes.I want to learn PHP for the sole purpose of making a website that requires a database. It's a bit complicated, but I know it can be done. I was hoping someone could direct me to which tutorials I should read in order to learn this.I need a database of different accounts that users can log into. They accounts will each have individual values in certain fields, and they will be able to edit their "actions" at will. It will look something like this when they log in;Value 1: 10Value 2: 10Value 3: 10Actions: (They can select 1 from a dropdown menu)Raise value 1 by 5Raise value 2 by 5Raise value 3 by 5I will need access to an admin CP which will allow me to hit an "update" button. The button will process the information in each account, and raise the fields accordingly. (If someone left their action as "Raise value1 by 5" when I hit the update button, their profile will be updated with 15 in value 1.)The explanation was quite poor, so please tell me if it needs clarification. I know nothing about PHP but would like to start learning; I just need to know which field of it I need to research.

Link to comment
Share on other sites

You can try the tutorial here:http://www.w3schools.com/php/php_mysql_intro.aspThere are several books about how to use PHP and MySQL together:http://www.oreilly.com/catalog/9780596514013/http://www.oreilly.com/catalog/webdbapps2/It sounds like you'll need a couple extra fields in the users table to say how much to increase and which field to increase. Your processing page will need to loop through all the user records and check if there is a field that should be updated and by how much. When you update the field you might want to reset the value of one of the other fields to make sure you don't update the same thing twice, depending on how you want it to work.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...