I am new to php and try to make login form but their will be error while make a connection.i didn't get it.
<?php
// this will avoid mysql_connect() deprecation error.
error_reporting( ~E_DEPRECATED & ~E_NOTICE );
// but I strongly suggest you to use PDO or MySQLi.
define('DBHOST', 'localhost');
define('DBUSER', 'root');
define('DBPASS', '');
define('DBNAME', 'simple_login');
$conn = mysqli_connect(DBHOST,DBUSER,DBPASS);
$dbcon = mysqli_select_db(DBNAME,$conn);
if ( !$conn ) {
die("Connection failed : " . mysqli_error());
}
if ( !$dbcon ) {
die("Database Connection failed : " . mysqli_error());
}
please if anybody know help me.thanks in advance.