07-06-2019, 05:31 PM
Hi guys, so to be such a bother but I am having trouble with a query which just looks perfect to me.
PHP Code:
$this->forename = 'testing';
$this->surname = 'testing';
$this->email = 'testing';
$this->password = 'testing';
$this->address = 'testing';
$this->city = 'testing';
$this->county = 'testing';
$this->country = 'testing';
$this->post_code = 'testing';
$this->access_level = 0;
echo $id;
$this->password = password_hash($this->password, PASSWORD_DEFAULT, ['cost' => 15]);
$sql = "UPDATE user SET forename = ?, surname = ?, email = ?, password = ?, address = ?, city = ?, county = ?, country = ?, post_code = ?, access_level = ? WHERE id = ?";
$this->db->query($sql, array($this->forename, $this->surname, $this->email, $this->password, $this->address, $this->city, $this->county, $this->country, $this->post_code, $this->access_level, $id));