I notice the use of _GET in some messages. Is this the same as
HTTP_GET_VARS[]?
More or less. $_GET was added in version 4.1 and has an added advantage
of being global in scope (it's a superglobal).
Where in the manual is this documented?
http://www.php.net/release_4_1_0.php
-Original Message-
From: Mike Tuller [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 30, 2003 11:02 AM
Subject: [PHP] HTTP_GET_VARS[]
The issue I am
having now is that I have the editsoftwareassest.php's form
action set
to POST to a script called updatesoftwareasset.php
I am using PHP 4.3.0. it looks a little confusing because I am not
using the $_POST when calling variables, but that is because before
that script I have this.
$title = $_POST['title'];
$version = $_POST['version'];
$developer = $_POST['developer'];
$serial_number = $_POST['serial_number'];
$query = UPDATE assets SET title = '$title', version = '$version',
developer = '$developer', serial_number = '$serial_number', WHERE
asset_id = '$HTTP_GET_VARS[id]' ;
Change the var to '{$HTTP_POST_VARS['id']}' (with the curly braces
since
the array reference is inside a double
Everyone from this thread needs to reread this:
http://www.php.net/variables.external
Regards,
Philip
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Show us your code
- Original Message -
From: Mike Tuller [EMAIL PROTECTED]
To: php mailing list [EMAIL PROTECTED]
Sent: Friday, January 17, 2003 4:05 PM
Subject: [PHP] $HTTP_GET_VARS
I am following an example in a book and have run into a problem with a
script that I am trying to run
Nevermind. When copying my code to show you I noticed I have
HTTP_GET_VARS, instead of $HTTP_GET_VARS, and now everything works.
Time to go home I guess.
On Friday, January 17, 2003, at 04:22 PM, Rick Emery wrote:
Show us your code
- Original Message -
From: Mike Tuller [EMAIL
- Original Message -
From: Mike Tuller [EMAIL PROTECTED]
To: php mailing list [EMAIL PROTECTED]
Sent: Friday, January 17, 2003 5:05 PM
Subject: [PHP] $HTTP_GET_VARS
I am following an example in a book and have run into a problem with a
script that I am trying to run under PHP 4.3.0.
checkout the most recent version of the help documents from php.net. it
will tell you.
something to do with $_GET, i think...
Jim
- Original Message -
From: Mike Tuller [EMAIL PROTECTED]
To: php mailing list [EMAIL PROTECTED]
Sent: Friday, January 17, 2003 2:05 PM
Subject: [PHP]
Jason,
What is the difference?
Jason Wong [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Monday 14 October 2002 08:36, John Negretti wrote:
Marco,
I was reading that there were some security risks with
register-globals. Is this the same thing
http://localhost/test.php?var=5
results in (global scope)
$var = 5; // Register globals on
$HTTP_GET_VARS['var'] = 5; // Always (?)
$_GET['var'] = 5; // With newer versions of PHP
To access this from a function:
function x() {
global $var;
globsl $HTTP_GET_VARS;
echo $var.'BR';
Try using
global $HTTP_GET_VARS;
at the beginning of your function. $HTTP_GET_VARS has global scope, and
by default PHP isolates functions from the parent scope.
Marco
On Sun, 2002-10-13 at 16:39, John Negretti wrote:
Hello All,
I am calling a particular function. Within that
Marco,
I was reading that there were some security risks with
register-globals. Is this the same thing as global.
John Negretti
www.ideablue.com
Marco Tabini [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Try using
global $HTTP_GET_VARS;
at the
On Monday 14 October 2002 08:36, John Negretti wrote:
Marco,
I was reading that there were some security risks with
register-globals. Is this the same thing as global.
No, they're totally different things.
--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software
14 matches
Mail list logo