Undefined index error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So sometimes I end up with issues that are so simple I should be able to fix it but for some reason I end up asking a stupid question to the list... So... Here goes :)

Here is the error:

Notice: Undefined index: 2 in /home/raosetc/public_html/purl/p.php on line 19

and here is Line 19:

$data = explode("/", $_SERVER['REQUEST_URI']);


When you first hit the site you to go something like: purl.mysupersite.com/YourNameHere

If you went to: purl.mysupersite.com/YourNameHere/ (Notice the trailing /) there would be no error...

Now I know it's just a undefined index error and I can safely ignore it since it works just fine. All I have to do is turn off the error reporting and it's gone... But I want to write good code...

Any Suggestions?


--
Jason Pruim
japruim@xxxxxxxxxx
616.399.2355




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux