Jump to content

shalkith

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

shalkith's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I changed the mssql instances to mysql and the 500 error went away but its still not displaying the rank. There's no output where i put the code now.
  2. no good. Still getting the error with that code.
  3. I think its just a generic error with this one. If I remove that last bit of code it comes back without issues. All other pages still work fine.
  4. now im getting an internal server error 500 on that page. Sorry for making so much work for this lol and thanks for all your help so far!!
  5. ok, now i get No database selected
  6. Now I am getting this: MySQL query error: SELECT rank.rank, members.r_id FROM (members JOIN rank ON rank.r_id=members.r_id) WHERE members.r_id='2' Lol
  7. <?php print_r($_SESSION); ?> is giving me: Array ( [sESS_EMAIL_ADDRESS] => my email address [sESS_MEMBER_RANK] => 1 [sESS_MEMBER_ID] => 2 [sESS_FIRST_NAME] => firstname [sESS_LAST_NAME] => lastname ) I also tried <?php echo $_SESSION['SESS_MEMBER_ID']; ?> again and it gave me my user member_id primary key number. (i had to delete the query that was causing the error before those worked)
  8. r_id is the rank ID the member ID is member_id when I sign in the session ID is SESS_MEMBER_ID I'm sure I'm signed in. <?php echo $_SESSION['r_id']; ?> in the body tags does nothing. I also tried it with $_SESSION['SESS_MEMBER_ID'] and $_SESSION['member_id'] because I wasnt sure. This is what i currently have $id = $_SESSION['SESS_MEMBER_ID']; $sql = "SELECT rank.rank, members.r_id FROM (rank JOIN members ON rank.r_id=members.r_id) WHERE members.r_id=$id"; $sql_result = mysql_query ($sql, $conn ) or die ('MySQL query error: '.$sql); $row = mysql_fetch_assoc($sql_result);$rank = $row['rank']; echo $rank; <?php echo $_SESSION['r_id']; ?>
  9. I do not currently have a list of all current users. That was one of the other items I was going to start working on soon. I would like it to post only the rank of the current logged in user.
  10. hmm... Now I'm getting MySQL query error: SELECT rank.rank, members.r_id FROM (rank JOIN members ON rank.r_id=members.r_id) WHERE members.r_id= in the same place i was getting the code before.
  11. well, I've been poking around with it and now im just seeing the code on the page itself. Basicaly im getting: Name: John Doe Email: email@email.email Rank: SELECT rank.rank, members.r_id FROM (rank JOIN members ON rank.r_id=members.r_id) WHERE members.r_id=$id
  12. Cool thanks! I ended up getting it uploaded but I think im doing something wrong cause that code kills my page. Where do I insert that code? should there be any other tags around it? and where should i put: $id = $_SESSION['r_id']; should I put that in with the other session stuff? (username, name, email ect ect)
  13. Thanks for the reply!! Do I need to get rid of the 2nd set of "( )"? Other than that I've changed the code to what I think should work on my page. I havent tested this as I'm not currently able to upload to my host Does this look right? Table1 / rank is the table with the rank names and the rank ID is the primary key. Table2 / members is the table with the member information in it and a column named r_id that will be used to assign each user to their groups. SELECT rank.rank, members.r_id FROM (rank JOIN members ON rank.r_id=members.r_id) WHERE members.r_id=$id Does this look right? Does case matter in this situation?
  14. Good afternoon, I'm quite new to PHP and I've got a site running a custom cms that im kinda throwing together. I've got logins and registration working. In my members table i have a column to assign each user to a group. (e.g. Admin, user, ect) What would I need to do to to make it so some links only show for members of those groups?
×
×
  • 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.