I have a PHP site which has a lot of POST and GET variables.
For each of the POST and GET variables on every page I have added as follows:
If I needed only numbers in the [POST/GET] variable...
$post_q_time_post = preg_replace('~[^0-9]+~', '', $_POST["q_time_post"] );
If I needed Text / Numbers ..
$post_oldp = preg_replace('~[^a-zA-Z0-9]+~', '', $_POST['oldp'] );
And then used the stripped variable all over the page.
How secure is my site now? Is it possible to do SQL injection of any other PHP based attack now ? If so, what additional steps I should do ?
Thanks.