I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5778
46265 credits Members referred : 3
« Reply #3 on: Jul 19, 2007, 05:23:47 pm »
Yeah right, with no registered globals is much better. I had posted this tutorial just for Meth0d who wanted registered globals and his host didn't had this directive on.
Yeah right, with no registered globals is much better. I had posted this tutorial just for Meth0d who wanted registered globals and his host didn't had this directive on.
Where are my glasses?
Posts: 21
138 credits Members referred : 0
« Reply #5 on: Jul 20, 2007, 01:02:12 am »
Thank you! I think the best way is to have register_globals deactivated. extract() can make sense if you need a template engine which can interpret PHP code.
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5778
46265 credits Members referred : 3
« Reply #6 on: Jul 20, 2007, 10:24:54 am »
In most cases you need to validate data for mysql queries. So I guess you will need to do something like :
$id = (int) $_GET['id'];?>
On the other hand if you are using registered globals, the order that the variables are registered (get, post, etc.) can be different in different hosts and that can be a huge headeache