Fw: [PHP-WIN] register_globals and php 4.2
| From: | Afan Pasalic | Date: | Thu, 09 May 2002 23:27:26 +0000 |
| Subject: | Fw: [PHP-WIN] register_globals and php 4.2 | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-13672@lists.php.net to get a copy of this message | ||
I have the same problem but putting $var_name = $_GET['var_name'] didn't solve the
problem. I put it on the top of the page (e.g. line no. 2) and I'm getting error:
PHP Warning: Undefined index: var_name in F:\bhdanas.com\index.php on line 2
Any idea?
Afan
----- Original Message -----
From: Shrock, Court
To: brother ; 'php-windows@lists.php.net'
Sent: Thursday, May 09, 2002 1:07 PM
Subject: RE: [PHP-WIN] register_globals and php 4.2
Replace all references of "$pagetype" with "$_GET['pagetype']"
(without the
doube-quotes, of course) or have the line "$pagetype = $_GET['pagetype']" at
the beginning of your file. Repeat this same idea with your other variables
and you should be okay.
> -----Original Message-----
> From: brother [mailto:brother@lunarstorm.se]
> Sent: Thursday, May 09, 2002 5:11 AM
> To: 'php-windows@lists.php.net'
> Subject: [PHP-WIN] register_globals and php 4.2
>
>
> I'm trying to rewrite my code so it will be useful under PHP 4.2.
> the links at my site are in this format
> index.php?pagetype=newsarchive&id=15&read=1 this will make
> php to look fpr
> the file /newsarchive/data.php and use the $id var to get the correct
> newsline from the databse, however, when the register_globals
> is set to off
> I can't use this and I cann't figre out how to do it, HELP!
>
> the index.php starts with the code:
> if (!isset($pagetype)) {
> $pagetype = "news";
> }
>
> so all links displays the news page and that's not my goal =)
>
> /brother
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php