Jump to content

snallemap

Members
  • Posts

    60
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

snallemap's Achievements

Member

Member (2/5)

0

Reputation

  1. isset() cannot be used to check if your logged out can it?..., if it can then i dunno how to set it up in the code
  2. Alright, so meanwhile i wait for answer on the other thread i started another project, to fix the menu... but it was a bit confusing so now i ask you again!... Heres my current menu.php <?php include "config.php"; if (!$_SESSION["valid_user"]) { echo '<a href="login.php">' . 'Login <br/><br/>' . '</a>'; } if ($_SESSION["valid_user"]) { echo '<a href="logout.php">' . 'Logout <br/><br/>' . '</a>'; echo '<a href="members.php">' . 'Control Panel <br/><br/>' . '</a>'; } echo '<a href="memberlist.php">' . 'Members <br/><br/>' . '</a>'; echo '<a href="ranking.php">' . 'Rankings <br/><br/>' . '</a>'; ?> Now it works perfectly when logged in, but when you logout the session dies, leaving me with this: Notice: Undefined index: valid_user in C:\wamp\www\kawaii\menu.php on line 5 Login Notice: Undefined index: valid_user in C:\wamp\www\kawaii\menu.php on line 10 Members Rankings Now, how can i make a login that depends on if your logged in if this happens when you logout..., i hope someone can find a solution that can work out
  3. Hey guys! I ran into another problem, i am looking to create a system so my users can go edit their accounts such as: Password, Age and Info and so on. but im am totally blank so i need some kind of tutorial to get started, or maybe help if anyone got time for that. Thanks
  4. True thing thank you alot for helping me out
  5. Yep we are one step closer indeed , After changing my status in the database to test out what would happen i found out that even if i put my status to 5 i will still be under the honored members, i believe that for some reason it goes from 2 and up or something?... And then 4 cant get in action I changed the switch: switch ($row['status']){ case '1': $memberLinks .= "<a href=\"profile.php?id=".$row['id']."\">".$row['username']."</a>\n\r"; break; case '2': $honoredLinks .= "<a href=\"profile.php?id=".$row['id']."\">".$row['username']."</a>\n\r"; break; case '3': $honoredLinks .= "<a href=\"profile.php?id=".$row['id']."\">".$row['username']."</a>\n\r"; break; case '4': $adminLinks .= "<a href=\"profile.php?id=".$row['id']."\">".$row['username']."</a>\n\r"; break; And now it works just like it should thank you alot
  6. admins: Honored: snalle test Members: snallesnal bulle test should have been under admins since he got status 4 :/ ?
  7. Result of the first: snalle test snallesnal bulle Result of the next: snalle test snallesnal bulle
  8. I did not double the = ... But ill do it now and this is the result of it: Notice: Undefined variable: result in C:\wamp\www\kawaii\memberlist.php on line 6 So lets go with = ? xD
  9. All the link outputs is perfect, no problems there It gets you right to their profile page.
  10. snalle and status =2 snallesnal and status =1 bulle and status =1 test and status =4 Thats the outcome, just to make clear i want something like this: Admin: - All with status 4 here Honored Members - All with status 2 and 3 here Members - All with status 1 here
  11. Once you guys wake up again i really hope we can go for a second attempt to fix this
  12. <?php include "config.php"; $sql = "SELECT id, username, status FROM gusers"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { while ($row = mysql_fetch_assoc($result)) { echo "<a href='profile.php?id={$row['id']}'>{$row['username']} </br> </a>"; } } } ?> There! Theres none of the accounts with a 0 in their status value. Does that mean we are ready to add the switch ?
×
×
  • 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.