Created
December 27, 2016 11:31
-
-
Save vranac/02bcde27e8cdd516ab0a2e1585f00904 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
$db= mysqli_connect('localhost', 'korisnik1', '12345', 'baza1'); | |
if(isset($_POST['send'])){ | |
$pass=addslashes($_POST['pass']); | |
$sql=" SELECT * FROM baza1 WHERE pass='$pass' "; | |
$result=mysqli_query($db,$sql); | |
if(mysqli_num_rows($result)==1){ | |
$_SESSION['message']="Konektovani ste na bazu podataka"; | |
$_SESSION['pass']=$pass; | |
header("Location:korisnicki.php"); | |
}else{ | |
$_SESSION['message']="Uneti podaci nisu tacni"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment