The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Programming Fundamentals" Dec 02 - 2:00 PM Eastern

PHP + MYSQL Users system coding

  • # February 24, 2014 at 2:41 am

    Hi everyone i have been trying to code a user system with email validation everything work the only problem is my validation page by default 0 is not validated and 1 is validated BUT when i try my code its display the users control panel as if the users was validated even if she/he not

    In MYSQL the validated for my username is set to 0 and its return it as i where activated

    Here a part code of the users only page if :

    if ($logged[username] && $logged[validated] != “0”)
    echo (“you are not validated”);
    if ($logged[username] && $logged[validated] != “1”)
    echo (“you are validated”);

    # February 24, 2014 at 3:51 am

    != means not equal to.

    So you’re essentially saying, if the user is not equal to 0, you are not logged in. It should be, if the user is not equal to 1, you are not logged in or if the user is equal to 0 you are not logged in.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed