website running php 5.2. Inputting text in my search box containing an apostrophe throws up this message : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's%' ORDER BY name,shortdesc ASC LIMIT 0,20' at line 1
Here is part of my search.php script. Any help would be appreciated.
function resultados(){
$acc = $_GET['acc'];
$byartiste = ereg_replace("'","'",$_GET['byartiste']);
$bytitle = ereg_replace("'","'",$_GET['bytitle']);
$L = $_GET['L'];