$q = "INSERT INTO articles VALUES( mysql_real_escape_string($_GET["article"]) )
$req = $bdd->prepare($q);
$req ->execute();
I've been working on another server where mysql_real_escape_string() is still not obsolete, and now I'm moving the site to another mysql server which apparently doesn't accept this function anymore. And, it's pretty clear I need to use some PDOs
SO what's the PDO equivalent for mysql_real_escape_string()? I'm trying something like this
$idc = new PDO(...);
$q = "INSERT INTO articles VALUES( $idc->quote(($_GET["article"])));
$req = $bdd->prepare($q);
$req ->execute();
I do use prepared statements, but I suspect my PDO::quote is wrong somewhere.
But it doesn't render the same result... Thank you.