SHARE
TWEET

Untitled

a guest Jun 15th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. start_session();
  2.  
  3.  
  4. provjeraTocnihPodataka();
  5.  
  6.  
  7. if(isset($_SESSION['hash'])){
  8.     prikazLogiraneStranice();
  9. }else{
  10.     prikazLoginForme();
  11. }
  12.  
  13.  
  14. function prikazLoginForme(){
  15.     echo '<form action="" method="POST">';
  16.     echo    '<p>Username: <input type="text" name="username" /></p>';
  17.     echo    '<p>Password: <input type="password" name="password" /></p>';
  18.     echo    '<input type="submit" value="Login" />';
  19.     echo '</form>';
  20. }
  21.  
  22. function prikazLogiraneStranice(){
  23.     require_once 'homepage.html';
  24. }
  25.  
  26. function provjeraTocnihPodataka(){
  27.     //ucitaj iz baze i provjeri jesu tocni podaci
  28.     // ako jesu stavi $_SESSION['hash'] = md5($username);
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top