Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP + MYSQL Users system coding

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #163942
    mohamedismail
    Participant

    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”);
    }
    else
    {
    if ($logged[username] && $logged[validated] != “1”)
    {
    echo (“you are validated”);

    #163944
    chrisburton
    Participant

    != 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)
  • The forum ‘Back End’ is closed to new topics and replies.