$_GET & $_POST Question
Posted: Wed Aug 16, 2006 5:14 am
Ok, I have a page that gets called from a <FORM> and also a link <A HREF='page.php?var=$var'>.
So for the variables I need $_GET ... and $_POST for the form.
Is it correct to put something like this:
so it picks up the variable with either type of input, or should I use some kind of if statement to filter it first?
Note that I do filter the input to make sure nothing nasty comes through.
So for the variables I need $_GET ... and $_POST for the form.
Is it correct to put something like this:
Code: Select all
$var = $_GET['var'];
$var = $_POST['var'];Note that I do filter the input to make sure nothing nasty comes through.
