Jump to content

echoindia756

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

echoindia756's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi thanks for that! I think I almost got it working, the problem I am having now is that if there is more than one row in the table, it only displays one of the rows on the html table, is there anyway to display all of the rows that are in the table? Many thanks for your help.
  2. Hi there, I'm having a bit of trouble getting something to work. Basically, I have several fields in a table: "Item Name" and "Item Price" These values are dynamic to each user (so different items will appear depending on your username), I want to retrieve this information from the database row and put it into a HTML table on the users homepage on my website So for example the data would appear like this: Item Name Item Price Digital Camera €40.00 Underwater Camera €50.00 So I think the mysql query would be something like: mysql_query("SELECT * FROM table_name WHERE user_id = $_SESSION['user_id']"); But i'm not sure how to get all the users items to display on the table, could someone help me with the PHP code please? I'd really appreciate it! Thanks in advance!
  3. Hi guys, Does anybody have any ideas? How about if I tried something with $_SESSION ? Would that work? For example, could I put WHERE game_planets.id_owner = $_SESSION['userid'] ?
  4. You know how you said: in the "however you have your data set", what exactly goes there? Another table? e.g `game_planets.id_owner`='game_planets.name' LIMIT 1"); This is puzzling me!
  5. Ok, so when you say "=" does that mean that for example 1=1 or does it mean that they are in the same row of data? I'm just slightly confused! Thanks!
  6. Thanks! I have an ID Field in the database called id_owner and another field with the name of the planet. So would this work? mysql_query("UPDATE `game_planets` SET `belcredits`=`belcredits`+100 WHERE `name`='id_owner' LIMIT 1");
  7. Yea, that would be the logical thing - but how do I get the user id, I mean, I know you use the SELECT command to get things but how do I tell the code to identify the current user and match it up with the data in the username's field? If I could do that, that would solve the problem!
  8. You know what I mean anyway.
  9. Ok, for example: Let's say one of the errors is $SelectProduct = $_GET['whatever']; You would put that near the top of the page, and then wherever the error is, you just right it so that it says: $SelectProduct; i.e remove everything after the equals, except the semi-colon of course.
  10. Is there no way I can tell the code to only update the person's belcredits who bought the credits?
×
×
  • 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.