I am facing an error in this following function in my class.
<?php
if(isset($_REQUEST['customer_id'])){
$customer_id = $_REQUEST['customer_id'];
}
?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$data = array(
$_POST['customer_name'],
$_POST['customer_address'],
$_POST['customer_phone'],
$_POST['customer_email']
);
var_dump($data);
$update = DB::update('customer',$data,$customer_id,'customer_id');
Error message is :
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens' in
What is the issue here? I missed anything i dont see the issue with my sleepy eyes...
var_dump result is:
array (size=4)
0 => string 'Foo M' (length=5)
1 => string 'Foo Lab' (length=17)
2 => string '2147483647' (length=10)
3 => string 'foo@moo.com' (length=11)