I have a simple code :
$SQL = $db->prepare(
"INSERT INTO tbl_signup (full_name,email,telephone,password) VALUES (?,?,?,?)");
$SQL->bind_param('ssss', $full_name, $signup_email,$telephone, $password);
$SQL->execute();
This code doesn't work. No row inserted in bdd. No error. Nothing.
And when I add before :
$full_name = $signup_email = $telephone = $password = "";
The code works.
Conclusion : undefined variable are not allowed with bindparam.
But how to get an error in my case ??
I have tried all :
$SQL->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$SQL->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$SQL->execute();
echo "\nPDO::errorCode(): ", $SQL->errorCode();
print_r($SQL->errorInfo());
$SQL->debugDumpParams();
But I have no error.
How to get error ?