key
is a reserved word
in MySQL. Enclose it in backticks !
Like this..
$query = "INSERT INTO confirm (`key`, angemelde
^ ^ ------ Like that
This(mysql_*
) extension is deprecated as of PHP 5.5.0
, and will be removed in the future. Instead, the MySQLi
or PDO_MySQL
extension should be used. Switching to PreparedStatements
is even more better to ward off SQL Injection attacks !
^ ^