我的PHP存在问题

This is what I get when I attempt to use my log in form. My PHP, HTML, and error is listed below

PHP:

<?php
$con=mysqli_connect("h","h","h","g");
$sql = "SELECT username, password FROM users WHERE username=? AND  pwd=? LIMIT 1";
$stmt = $con->prepare($sql);
$stmt->bind_param('ss', $_POST["username"], $_POST["pwd"]);
$dbh->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$stmt->execute();
$stmt->bind_result($username, $password);
$stmt->store_result();
if($stmt->num_rows == 1)
{
    echo "you are logged in";
}

HTML:

<form action="login.php" method="post">
  <input type="text" name="username"required>
  <p>
    <input type="password" name="pwd"required>
  <p>
    <input type="submit" name="Sign Up" value="Log In">
</form>

Error:

Fatal error: Call to a member function bind_param() on a non-object in /home/u378761662/public_html/login/login.php on line 5

Looks like an exception is thrown on login.php at the line no: 5.

Add echo $con->error; before $stmt->bind_param('ss', $_POST["username"], $_POST["pwd"]); and see if it throws an error.

Hope this helps.