Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $dbc = mysqli_connect('localhost', 'root', '', 'BazaPodataka') or die('Error.');
- $sql="SELECT username, password FROM users WHERE username=? AND password=?;";
- $stmt=mysqli_stmt_init($dbc);
- if (mysqli_stmt_prepare($stmt, $sql)){
- mysqli_stmt_bind_param($stmt,'ss',$username,$password);
- mysqli_stmt_execute($stmt);
- mysqli_stmt_store_result($stmt);
- }
- mysqli_stmt_bind_result($stmt, $a, $b);
- mysqli_stmt_fetch($stmt);
- if (mysqli_stmt_num_rows($stmt)>0) echo ('Uspjesan login');
- else echo "Nema takvog klijenta ".$password;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement