Advertisement
Wubistick

Untitled

Feb 19th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. <?php
  2.  
  3. $user = $_POST['username'];
  4. $pass = $_POST['password'];
  5. $login = $_POST['login'];
  6.  
  7. if(isset($login) {
  8.     if($user == 'svetlio' && $pass == '1234567890') {
  9.         redirect('localhost/stream.html');
  10.     }
  11.     else {
  12.         echo("Ne staa kmete");
  13.     }
  14. }
  15. // $url should be an absolute url
  16. function redirect($url){
  17.     if (headers_sent()){
  18.       die('?> <script type="text/javascript">window.location=\''.$url.'\';</script‌​> <?php');
  19.     }else{
  20.       header('Location: ' . $url);
  21.       die();
  22.     }    
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement