Re: querystring and PHP 4

From: Date: Thu, 05 Dec 2002 00:20:37 +0000
Subject: Re: querystring and PHP 4
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-127065@lists.php.net to get a copy of this message
register_globals which turned the id= into $id is turned off in PHP 4. This is a good thing(security reasons). You need to use $_GET['id'] (or in PHP3, $HTTP_GET_VARS['id'], and this also works in PHP4). It takes a bit to get used to it, but it's a much better way to handle things, especially where security is concerned. Hope this helps. --Joseph Guhlin http://www.josephguhlin.com/ Web Programmer / Unix Consultant / PHP Programmer Dan Wade wrote:
Hello, i'm grabbing querystring data like: www.myserver.com/foo.php?id=bar <? echo $id; ?> It works like a champ on dev server using php 3 but the sys admin use PHP 4 on the production box and the querystring is no longer being passed. I can't imagine this changed from version to version. Is he missing something in his install? thanks, -Dan


« previous php.general (#127065) next »