How to change wamp phpmyadmin password?

Showing content whether user is logged in or not?

  • I need some help with how content changes when a user is logged in and off, (MySQL - phpmyadmin) the code I have right now is this: <?php session_start(); if (isset($_SESSION['members'])) { echo "<div id='top_right'><a href='/profile.php'>Profile</a> | <a href='/members.php'>Members Area</a> | <a href='/settings'>Settings</a> | <a href='/logout.php'>Logout</a><br>"; } else echo "<div id='top_right'><a href='/login.php'>Login</a> | <a href='/register.php'>Register</a><br>"; ?> but for some reason this does not change it just keeps it as Login | Register. the table I inputed the login stuff into is named members and has 6 fields, these being in order: id, username, password, email, date, ip Does anyone have any detail on why this is not working? I can login correctly as when I go to my members.php page it says You are currently logged in, admin. but thats it, the navigation still does not change, any help? Cheers, Liam.

  • Answer:

    if isset(($_SESSION['members']) and ($_SESSION['members'] != "")) { // If they are registered and NOT NULL Also... Your ELSE statement is not enclosed in curly braces.. The PHP server is reading echo "<div id='top_right'><a href='/login.php'>Login</a> | <a href='/register.php'>Register</a><br>"; as UNCONDITIONAL.. drop some braces around that bad boy. I am assuming your login process has $_SESSION['members'] = TRUE; someplace?

Liam at Yahoo! Answers Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.