Jump to content

MstrGmrDLP

Members
  • Posts

    9
  • Joined

  • Last visited

MstrGmrDLP's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Okay, I had a similar problem before. $users = mysql_query("SELECT * FROM users"); while($users = mysql_fetch_assoc($users)){ echo "<tr><td><p><a href='users.php?id={$users['user_id']}'>{$users['user_name']}</a></p></td><td>{$users['user_clan']}</td><td>{$users['troop_donations']}</td></tr>"; }
  2. I use $_SESSION for my website. Just about everything a user needs is in a session. I haven't had any troubles yet. When they first sign in it sets the information. My opinion is it is safe to use.
  3. Sorry if this is simple. I over think stuff a lot and I can't figure it out because I think to hard about it.
  4. I have this Banner ad rotation script. $banner[1] = '<a href="http://www.facebook.com/mstrgmrs"><img src="/adverts/mstr_gmrs.png" width="900" height="200" border="1"></a>'; $banner[2] = '<a href="http://www.twitter.com/mstrgmrs"><img src="/adverts/banner_ad.png" width="900" height="200" border="1"></a>'; $banner[3] = '<a href="http://www.youtube.com/user/mstrgmrs"><img src="/adverts/banner_ad.png" width="900" height="200" border="1"></a>'; $banner[4] = '<a href="http://mastergmrs.enjin.com/"><img src="/adverts/banner_ad.png" width="900" height="200" border="1"></a>'; $id = rand(1,4); echo $banner[$id]; How can I make it so that code can work with a database?
  5. So I am trying to get this code $banner_ads = mysql_fetch_assoc(mysql_query("SELECT * FROM adverts")); Wait. Would i just do a random number where the highest number is the count of all of those?
  6. Okay, I am having a little trouble with a mysql table. I am trying to make a table. I have a <tr> in a while statement. I am trying to make it so that it will go and display 5 users across the <tr> and then it will close the tr and start a new one and repeat showing the next 5 users. What would the code for this be? Any help would be appreciated
  7. I had already fixed this by the time you posted that. Thanks for trying to help. Sorry for wasting your time.
  8. Requesting help from anyone who is a geek. My code is checking all of the friends where the logged in user is user_id. It gets all of the values but only displays 1. What am I doing wrong? Then later on I have a while loop getting this information. But it only displays 1 users information. Why won't it show them all? If you could help I would be really happy
  9. So my code I have 3 requests for the user and it only shows 1. What is the problem?
×
×
  • 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.