Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:wampwwwAndroidPhpDemologin.php on line 9
- <?php
- $db_name="employes";
- $mysql_username ="root";
- $mysql_password ="";
- $server_name ="localhost";
- $conn = mysqli_connect($server_name,$mysql_username,$mysql_password,$db_name);
- if ($conn) {
- echo "connection successful";
- }
- else{
- echo "connection not success";
- }
- ?>
- <?php
- require "conn.php";
- $user_name = "hacen";
- $user_pass = "1234";
- $mysql_qry = "SELECT * FROM employe_data WHERE user_name LIKE '$user_name' AND password '$user_pass';";
- $result = mysqli_query($conn ,$mysql_qry);
- if (mysqli_num_rows($result) > 0) {
- echo "login success";
- }else{
- echo "login not success";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement