If you have already have a number of scripts and, especially, if you are doing
things with the variables inside the script (in other words, the variables
appear more than once), it can be more convenient to convert at the top of
each page, eg:
$id = $_REQUEST['id'];
$this = $_REQUEST['this'];
$
From: "Kim Jacobs (Crooks) - Mweb" <[EMAIL PROTECTED]>
> I have written some scripts to access my online
> SQL db and I've tested the scripts on my machine
> with PHP 4.3.6 and register_globals = On
> Now where I host my site, uses PHP 4.3.5 and has
> register_globals = Off which means of course,
don't have to bother checking both depending on whether
> your
> form was GETted or POSTed.
>
> _
> - Original Message -
> From: "Mikael Grön" <[EMAIL PROTECTED]>
> To: "Kim Jacobs (Crooks) - Mweb" <[EMAIL PROTE
ot;Kim Jacobs (Crooks) - Mweb" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, April 29, 2004 11:54 AM
Subject: Re: [PHP-DB] converting scripts for register_globals=Off
What register_globals does (Please correct me if I'm wrong) is convert
i.e. $_POST['variable_
Hi
There are three main types of data passed by the browser - GET POST and
COOKIE.
php creates an array for each type, so what is $id now would also be
$_GET["id"] or $_POST["id"]
There is also $_REQUEST which is a combination of $_GET and $_POST so
$_REQUEST["id"] will also work.
If it were a
- Mweb" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, April 29, 2004 11:54 AM
Subject: Re: [PHP-DB] converting scripts for register_globals=Off
What register_globals does (Please correct me if I'm wrong) is convert
i.e. $_POST['variable_name'], $_GET[
What register_globals does (Please correct me if I'm wrong) is convert
i.e. $_POST['variable_name'], $_GET['variable_name'] and so on to
$variable_name. which isn't very good from my point of view.
I suggest you make sure you use $_GET['your_variable'] when ever you're
fetching a GET variable,