The second time the POST value :supplier is used the script does not write to the database. Without this second instance everything writes as expected. What am I doing wrong?
$hostdb = 'localhost';
$namedb = 'dbname';
$userdb = 'username';
$passdb = 'password';
$charset = 'utf8'; 
if (isset($_POST['name'], $_POST['type'] , $_POST['number'] ,$_POST['supplier']  )) {
    // Connect and create the PDO object
    $options = [
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
        PDO::ATTR_EMULATE_PREPARES => false,
    ];
    $conn = new PDO("mysql:host=$hostdb;dbname=$namedb;charset=$charset", $userdb, $passdb, $options);
      try{
        $conn->beginTransaction();
    $stmt = $conn->prepare( ' INSERT INTO `Equipment` (name, type, number, supplier, status, managed_by )
VALUES (:name,:type,:number,:supplier,"Ready", :supplier) ' );
    $stmt->execute([
        'name' => $_POST['name'],
        'type' => $_POST['type'],
        'number' => $_POST['number'],
        'supplier' => $_POST['supplier'],
    ]);
 
    