when I enter no data in password and username field then it is working correct it says that "enter data" which is correct but when i enter the data and press sign in it just goes to a blank page no error nothing.After pressing sign in it just shows me a blank page.
php code:-
<?php
$conn_error= 'could not connect to the databse';
$mysql_host= 'localhost';
$mysql_user= 'root';
$mysql_pass= '';
$mysql_db='shubhamyadav';
mysql_connect($mysql_host, $mysql_user, $mysql_pass) or die($conn_error);
mysql_select_db($mysql_db) or die($conn_error);
if(isset($_POST['userName'])&& isset($_POST['pass'])) {
$userName = $_POST['userName'];
$pass = $_POST['pass'];
if (!empty($userName) && !empty($pass)){
$query = "SELECT 'id' FROM 'users' WHERE 'userName' = '$userName' AND 'pass' = '$pass'";
if ($query_run = mysql_query($query)){
$query_num_rows = mysql_num_rows($query_run);
if($query_num_rows == 0){
echo'invalid data';
}elseif($query_num_rows==1){
echo'ok';
}
}
}else{
echo'enter data';
}
}
?>
?>
html code on which i am displaying form:-
<form method="POST" action="connect.inc.php">
UserName<input type="text" name="userName" size="40">
<br>
<br>
Password<input type="password" name="pass" size="40">
<br>
<br>
<input id="button" type="submit" name="submit" value="Sign-In">
</form>
error_reporting(E_ALL|E_STRICT); ini_set('display_errors', true);mysql_database extensions, they were deprecated in PHP 5.5.0 and were removed in PHP 7.0.0. UsemysqliorPDOextensions instead. And this is why you shouldn't usemysql_functions.