I think this is actually a configuration problem...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
corwyn
Forum Newbie
Posts: 2
Joined: Sun Aug 24, 2003 7:14 pm
Location: Seattle, WA
Contact:

I think this is actually a configuration problem...

Post by corwyn »

I had PHP (version unknown) running on an XP machine and everything seemed to by hunky dory. I upgraded to 4.3.2 and at the same time put it up on my Win 2k server. Now code that was working fails. The particular failure is as follows:

I have an href with a link as follows main.php?menuarea=deparments

and I have the following code
<?php
if (isset($menuarea))
if ($menuarea == "departments") include("deptMenu.inc");
?>

I get
Notice: Undefined variable: menuarea in C:\Inetpub\wwwroot\Norwescon\Norwescon 27\menu.inc on line 39

this same code worked before I upgraded and fails the same way on both the XP box and Win 2k box BUT does work on the Linux box running 4.3.2 that the code will eventually reside on. Thus I suspect a configuration issue.
Drachlen
Forum Contributor
Posts: 153
Joined: Fri Apr 25, 2003 1:16 am

Post by Drachlen »

Try adding this right below your <?php
$menuarea = $_GET['menuarea'];

It has to do with register_globals..

See here: http://www.devnetwork.net/forums/viewtopic.php?t=511 Read this, and all the other pinned topics.
corwyn
Forum Newbie
Posts: 2
Joined: Sun Aug 24, 2003 7:14 pm
Location: Seattle, WA
Contact:

thanx

Post by corwyn »

That was exactly what I needed to know..
Post Reply