my pdo connection doesn't work
问题 Echoing to my previous question about SQL-injection. I'm trying to set up a PDO connection. For that I want to replace my old code with the new: Here is the old $conn = mysql_connect("localhost", "sec", "dubbelgeheim") or die('Error: ' . mysql_error()); mysql_select_db("bookshop"); $SQL = "select * from productcomment where ProductId='" . $input . "'"; $result = mysql_query($SQL) or die('Error: ' . mysql_error()); $row = mysql_fetch_array($result); if ($row['ProductId']) { echo "Product:" .