title: how to edit data using php PDO
body: <p>hye i have a little problem about editing data</p>
  <p>Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in D:\Xampp\htdocs\HomeComfort\order-edit.php:25 Stack trace: #0 D:\Xampp\htdocs\HomeComfort\order-edit.php(25): PDOStatement-&gt;execute(Array) #1 {main} thrown in D:\Xampp\htdocs\HomeComfort\order-edit.php on line 25</p>
  <p>This is an error that occur when i edit the data</p>
  <pre><code>    if (isset ($_POST['item']) ) {
    $item = $_POST['item'];
    $date = $_POST['date'];
    $address = $_POST['address'];
    $price = $_POST['price'];
    $status = $_POST['status'];
    $sql = 'UPDATE `order` SET `order_status`=:status WHERE `order_id`=:id';
    $statement = $connection-&gt;prepare($sql);
    if ($statement-&gt;execute([':id' =&gt; $id,':item' =&gt; $item,':date' =&gt; $date, ':address' =&gt; $address, ':price' =&gt; $price, ':status' =&gt; $status])) {
      header(&quot;Location: admin-order.php&quot;);
    }
  }
  </code></pre>
  <p>The error occur at line <code>if($statement-&gt; execute...</code>after i submit after edit the data the error occur and i dont understand why</p>