Here is the PDO code in question:
$db->prepare("INSERT INTO user (id, name, password, salt, email, join_date, chats)
VALUES (NULL, ?, ?, ?, ?, ?, ?)");
$db->execute(array($name, $password, $salt, $email, $joindate, ''));
I get the fatal error: Fatal error: Call to undefined method PDO::execute() in register.php on line 12
, line 12 being the execute above. What could be wrong? The array contains perfect strings, checked them with a print_r.
PDO::prepare
returns a PDOStatement
object which has the execute
method.
$st = $db->prepare(...);
$st->execute(...);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With