Jump to content

markvaughn2006

Members
  • Posts

    108
  • Joined

  • Last visited

Everything posted by markvaughn2006

  1. is there an ADD command? or would I just store their gold value in a variable ($gold) and then make their "gold" = $gold + '100' or something like that?? Thanks!
  2. Hi, you guys have really helped me out!! I'm trying to update a users "gold" but I don't want them to be able to hit refresh and keep adding gold. Also this is what I have now mysql_query("UPDATE users_tbl SET gold = '100' WHERE user_name = '$_SESSION[myusername]' "); but obviously this sets "gold" to 100 it doesn't add 100 to "gold", how would I go about doing that? Thanks again guys!!
  3. thanks for the replies! yes its more of a table based game, and each person has a row, instead of a table. so i would only want them to have access to the row with the username that they log in with
  4. I'm struggling with how to allow a user access to their table and only their table for which they can view, update, edit, delete, etc.. data from their table. Database name is Game Fields in the table - ID, Username, Password, Strength, Dexterity, HP, Gold I'm thinking that i have to set up a session and store their username in a variable like $username and then if we wanted to display the users gold, it would be something like... $gold = mysql_query("SELECT Gold FROM Game Where Username=$username") echo $gold Am I anywhere close?? Any help with the sessions part of this? thanks!!
  5. Thanks for the help! In this example $result = mysql_query("SELECT * FROM example") where would you put the WHERE command?
  6. I'm trying to make a simple text game with php/mysql, how do you make it so when a person logs in, he can only look at his tables? Like a person logs in, and clicks on his inventory, how do you make that inventory.php display that persons inventory in his mysql table? Thanks for any help!!
×
×
  • 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.