It's possible avoid totally SQL injection allowing ONLY A-Z/0-9 in GET or POST parameter?
if(preg_match("/^[a-zA-Z0-9]+$/", $_GET['myVal']) == 1) {
$myValue = $_GET['myVal'];
} else {
die();
}
It's a good practice? It's possible defeat this way? Thanks