调用数据库函数不返回

The following code was being used to create a user at the beginning of the quiz, but is now updating an existing user's information. The call to addUser() is never completing, and I'm not sure why as I simply changed the page that it is redirecting to. All the input information is accurate and available for the addUser() call within my databaseAdaptor class, so I'm not sure where I'm getting stuck. In other words, the form at the end of the page is never being submitted, so I am never moving to final.php

$_SESSION['array_original'];
if(isset($_POST["user"]) ){
    $user = $_POST["user"];
    $array = $_SESSION['array_original'];
}
$height_in = $_POST['in'];
$height_ft = $_POST['ft'];
$height = 2.54 * (($height_ft * 12) + $height_in);
$weight = $_POST['lbs'];//conver this to kg

$userId = $myDatabaseFunctions->addUser($user, $_POST['Age'], $_POST['Gender'], $height, $weight );
?>

<form name='fr' action='final.php' method='POST'>
        <input type='hidden' name='user' value='<?=$user?>'>
        <input type="submit" />
</form>


<script type='text/javascript'>
document.fr.submit();
</script>

Code for addUser(): (the command I have constructed was working when I ran in inside of MySQL)

        public function addUser($user, $age, $gender, $height, $weight){
                //edit the information for a user after demographics page
                $stmt = $this->DB->prepare("UPDATE users SET age=:age, gender=:gender, height_cm=:height, weight_kg=:weight WHERE user_id=:user)");
                $stmt->bindParam('age', $age);
                $stmt->bindParam('gender', $gender);
                $stmt->bindParam('height', $height);
                $stmt->bindParam('weight', $weight);
                $stmt->bindParam('user', $user);
                $stmt->execute();

                //select last insert ID
                $stmt = $this->DB->prepare("SELECT LAST_INSERT_ID() from users");
                $stmt->execute();
                $userId = $stmt->fetch();
                return $userId[0];
        }

Any advice would be appreciated, thank you!

</div>

If you want to create user you must use INSERT instead of UPDATE

INSERT INTO users (user_id,age,gender,height_cm,weight_kg) 
VALUES (:user,:age,:gender,:height,:weight)

try this one

<?php
session_start();

define('HOST', 'localhost');
define('USER', 'root');
define('PASS', '');
define('DB', 'db_test');

error_reporting(E_ALL);
ini_set('display_errors', 1);

$conn=new mysqli(HOST,USER,PASS,DB);
if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
//=============================================
function addUser($user, $age, $gender, $height, $weight){
    //edit the information for a user after demographics page
    $stmt = $conn->prepare("UPDATE users SET user=?,age=?,gender=?,height_cm=?,weight_kg=? WHERE user_id=?)");
    $stmt->bindParam('sisiii', $user,$age,$gender,$height,$weight,$user_id);
    $stmt->execute();

    //select last insert ID
    $stmt = $conn->prepare("SELECT LAST_INSERT_ID() from users");
    $stmt->execute();
    $userId = $stmt->fetch_row();
    return $userId[0];
}

$_SESSION['array_original'];
if(isset($_POST["user"]) ){
    $user = $_POST["user"];
    $array = $_SESSION['array_original'];
}
$height_in = $_POST['in'];
$height_ft = $_POST['ft'];
$height = 2.54 * (($height_ft * 12) + $height_in);
$weight = $_POST['lbs'];//conver this to kg
$userId = addUser($user, $_POST['Age'], $_POST['Gender'], $height, $weight );
?>

<form name='fr' action='final.php' method='POST'>
        <input type='hidden' name='user' value='<?php=$user?>'>
        <input type="submit" />
</form>


<script type='text/javascript'>
document.fr.submit();
</script>

</div>