错误:SQLSTATE [HY093]:参数号无效:未定义参数

I need to send the name, lastname, number and email to a database. I created this code:

<?php
  echo $name;echo "<br>";
  echo $lastname;echo "<br>";
  echo $email;echo "<br>";
  echo $celnumber;echo "<br>";
  $servername = "localhost";
  $username = "usertest1";
  $password = "1234";
  $dbname="usertest1";
  try {
      $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
      // set the PDO error mode to exception
      $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

      // prepare sql and bind parameters
      $stmt = $conn->prepare("INSERT INTO tabela_script (name, lastname, email, celnumber)
      VALUES (:name, :lastname, :email, :celnumber)");
      $stmt->bindParam(':firstname', $name);
      $stmt->bindParam(':lastname', $lastname);
      $stmt->bindParam(':email', $email);
      $stmt->bindParam(':celnumber', $celnumber);
      $stmt->execute();

      echo "New record created successfully";
      }
  catch(PDOException $e)
      {
      echo "Error: " . $e->getMessage();
      echo "<br>";
      echo "<a href=\"main_html.html\"><h1>TRY AGAIN</h1></a>";
      }
  $conn = null;?>

And getting the error below:

Error: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined

I have to try below code on my local server.

Change

$stmt->bindParam(':firstname', $name);

To

$stmt->bindParam(':name', $name);

The issue was exact name was not matched that's why to return the error like this Error: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined