I\'ve scoured the web for a tutorial about this simple task, but to no avail. And so I turn to you helpful comrades. Here\'s what I need to do:
I have a MySQL database w
It's wise to take extra care when you are using $_GET
variables, because them can be easily altered by a malicious user.
Following with the example, you could do:
$foo = (int)$_GET['id'];
So we are forcing here the cast of the variable to a integer so we are sure about the nature of the data, this is commonly used to avoid SQL injections.