Currently i'm using a lot of $_GET parameters on my site like this: http://example.com/user.php?id=1
$id=mysqli_real_escape_string($link, htmlspecialchars($_GET['id'], ENT_QUOTES));
$id=preg_replace("/[^0-9]/", "", $id);
after that i'm checking mysql for user with id 1 using mysql SELECT.
does it make any sense? or should i use something better?