Jump to content

javmen

New Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by javmen

  1. okay so i have this page random name , hello.php

     

    i put this on top

    <?php

    require 'zwinky.class.php'; // require zwinky
     
    zwinky::authenticate_login(); // authenticates user, redirects user to login.php if they are not logged in.
     
    ?>
     
     
    and on my zwinky.class :
     
     
      // Authenticate login function.
       public static function authenticate_login() {
          session_start();
          if ( !isset($_SESSION['username']) | !isset($_SESSION['password']) | !isset($_SESSION['session']) ) {
             header('Location: login.php');
          }
       }
     
    okay when i go on the page hello.php for example yes it shows the login form of course cause i am not logged in and it redirects to
    login.php BUT i login and it refreshes and doesnt leave the login.php, also when i go straight to the login it wont go to the hello.php
    cause its somehow leading it back even though i enter correct details
  2. <?php

    require 'zwinky.class.php'; // require zwinky

    zwinky::authenticate_login(); // authenticates user, redirects user to login.php if they are not logged in.

     

    is added to the top of a random page and it puts the page white.

  3. http://paste.ee/p/tscSm

    look at those two php files.
    its login system on an online game which uses accounts from a game

    It works. I'd like to fix it up a bit. I wanna make it to where for example if someone goes to example.com/HOME , home will redirect to the
    login page if they are not logged in with THAT login system i gave you! if someone is logged in they have access to all pages, example/fds 
    etc etc. I know something about sessions but how would you go on about doing it with those logins i provided. I wanna block out ALL my pages UNLESS logged in.

×
×
  • 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.