PHP没有执行,也没有向数据库添加信息

I am on a localserver learning mysql and php on my local server MAMP, below i will put the code to all three of my files index.php, signup.php and dbh.php. I am trying to create a log in system but it does not send the information in the database but i do not get an error message either when running it runs fine but does not add the information that i entered in the sign up form.

My database name is drugcity and my username is drugcity_data and my password is admin

So please help been trying for hours!

index.php

<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title>Drug City</title>
        <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <body>
        <form action="signup.php" method="POST">
            <input type="text" name="usrname" placeholder="Username Here"><br>
            <input type="password" name="pwd" placeholder="Password Here"><br>
            <button>Sign Up</button>
        </form>
    </body>
</html>

signup.php

<?php
    include 'dbh.php';

    $username = $_POST['usrname'];
    $pass = $_POST['pwd'];

    $sql = "INSERT INTO users(usrname, pwd) VALUES ('$username','$pass')";
    $result = mysqli_query($conn, $sql);


    header("Location: index.php");
?>

dbh.php

<?php
    $user = 'drugcity_data';
    $password = 'admin';
    $db = 'drugcity';
    $host = 'localhost';
    $port = 8889;
    $conn = mysqli_connect($link, $host, $user, $password, $db, $port);
?>

I think, you have wrong connection to DB. You have

$conn = mysqli_connect($link, $host, $user, $password, $db, $port);

Why you have there $link variable? Try it without $link, so

$conn = mysqli_connect($host, $user, $password, $db, $port);

Try removing $link from your $conn = mysqli_connect($link, $host, $user, $password, $db, $port);

The first variable of mysqli_connect should be your host.

Now your host is empty so it doesn't know what to connect to..