Mysql连接到数据库没有在浏览器中显示任何内容

When I was trying to make website for school project then I make a registration page so I make a html page and a php and a database. But when I tried to enter anything in form then the result after submitting the information is blank page. When I opened php file in browser then a blank page opened. There should be either connected to the database or failed to connect to database. My coding of php file is given below: Please help me as less time is remaining for last date of submission.

  <?php

define('DB_HOST', 'localhost');
define('DB_NAME', 'practice');
define('DB_USER', 'root');
define('DB_PASSWORD', '');

$con = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die("Failed to connect     to MySQL: " . mysql_error());
$db = mysql_select_db(DB_NAME, $con) or die("Failed to connect to MySQL: " . mysql_error());


function NewUser()
{
    $fullname = $_POST['name'];
    $userName = $_POST['user'];
    $email    = $_POST['email'];
    $password = $_POST['pass'];
    $query    = "INSERT INTO websiteusers(fullname,userName,email,pass) VALUES    ('$fullname','$userName','$email','$password')";
    $data = mysql_query($query) or die(mysql_error());
    if ($data) {
        echo "YOUR REGISTRATION IS COMPLETED...";
    }
}

function SignUp()
{
    if (!empty($_POST['user'])) //checking the 'user' name which is from  Sign-Up.html, is it empty or have some text
        {

        $query = mysql_query("SELECT * FROM websiteusers WHERE userName='$_POST[user]' AND pass = '$_POST[pass]'") or die(mysql_error());

        if (!$row = mysql_fetch_array($query) or die(mysql_error())) {
            newuser();
        } else {
            echo "SORRY...YOU ARE ALREADY REGISTERED USER...";
        }
    }
}
if (isset($_POST['submit'])) {
    SignUp();
}
?>

MySQL is depreciated. Use MySQli instead

Connect to your database this way

$connect = mysqli_query(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);

then check this way

if($connect){
echo "Connected";
}else{
echo "Not connected";
}

and any query you run should be in this format

$query = mysqli_query($connect,$Sql);

I tried many source codes from google but I am unsuccessful everytime. Everytime I clicked on submit button it shows a blank page. Please provide me help I want to create a signup page and in this I want to connect html coding to mysql database I have knowledge about html. So please provide an easy way to interconnect the database and html. I also came to know about the php so I tried to copy source code from google but everytime I failed as php preview in browser is blank page.