Posted by Peter on 09/10/07 03:05
register_globals = off and I want to either POST or GET a variable to a
script.
How would you assign $myvar ?
If I do this:
$_GET['my_var'];
or
if ($_GET['my_var'])
{
//
}
is my_var assigned then ?
Or do I have to do this:
$my_var = $_GET['my_var'] ;
to assign the value
And what if my_var can be either POSTed or be in the URL (GET) ?
Should I do something like this then?
if (!$_GET['my_var'])
{
$my_var = $_POST['my_var'] ;
}
else
{
$my_var = $_GET['my_var'] ;
}
[Back to original message]
|