Jump to content

Undefined Index Error


FBCMike

Recommended Posts

Hello all Great forum here. I am a complete newb at this and could use some help. I installed WAMP and am trying to install PHPDirector, I put the PHP director files in the www directory like directed and when I go to LocalHost to finish the install I am getting 5 boxes with the following errors on my screen. Notice: Undefined index: Installing in C:\wamp\www\install\header.php on line 19Notice: Undefined index: connect in C:\wamp\www\install\header.php on line 19 here is line 19 of the install\header.php

<ul ID="install-progress"><li><a HREF="#">Upgrade/Install</a></li><li <?php if ($_POST["Installing"] == "License"){echo "class='selected'";}?>><a HREF="#">License Agreement</a></li><li <?php if ($_POST["Installing"] == "Connections"){echo "class='selected'";}?><?php if ($_GET["connect"] == "connect"){echo "class='selected'";}?>><a HREF="#">MySQL Connection</a></li><li <?php if ($_POST["Installing"] == "Connections2"){echo "class='selected'";}?>><a HREF="#">Create Tables</a></li><li <?php if ($_POST["Installing"] == "Options"){echo "class='selected'";}?>><a HREF="#">Options</a></li></ul>

any help would be appreciated. I will also attach the the whole Header PHP in case that will provide more info Thanks

header.php

Link to comment
Share on other sites

what's it's trying to say is that Installing and connect aren't members of the POST and GET arrays, respectively. You can easily verify what is in either of those array's by adding debugging at the top of your script.

var_dump($_POST); var dump($_GET);

the first step is making sure the data you expect to be there is in fact there. You have to understand that POST and GET are array's and array members need to exist before you can use or access them. In an array, a member can also be referred to an index (numeric or associative), and thus you the undefined index error you are getting, because you are trying to compare the values of array members that don't exist. Why they aren't there depends on the context of the code that you are working on. I am not familiar with PHPDirector, but looking at the page you provided it looks like they expect them to be there. Is there any supporting documentation you can provide us? The list of steps you are following? A troubleshooting/FAQ guide?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...