Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- require_once 'conn.php';
- if(isset($_POST['Submit'])){
- $user = $_POST['uname'];
- $pw = $_POST['pw'];
- $pword = md5($pw);
- try{
- $result=$mysqli->query("Select count(*) t from test.tbl_users where user_name='".$user."' and user_password='".$pword."' ");
- if($result){
- $row= $res->fetch_assoc();
- echo $row['t'];
- if($row['t']){
- echo "ok";
- }else{
- echo "<script> alert('NOT EXIST'); </script>"
- }
- }
- }
- catch(Exception $e){
- echo "<script> alert('".$e->getMessage()."''); </script>";
- }
- }
- ?>
Add Comment
Please, Sign In to add comment