Hi,
I just uploaded a new site I've created that works fine on my machine, but online I get this error on the home page:
PHP Notice: Undefined index: content in C:\Domains\sigalz.co.za\wwwroot\cv\xhtml\index.php on line 24
In my index file, I have this code:
Line 24 is marked in Red:
<?php
if (!isset($_REQUEST['content']))
$nextPage = "content/main.inc.php";
else
$nextPage = "content/" . $_REQUEST['content'] . ".inc.php";
if($_REQUEST['content'] != "gallery")
include($nextPage);
?>
Any ideas what can cause this?
PHP Notice: Undefined index: content in... Please help
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: PHP Notice: Undefined index: content in... Please help
Code: Select all
if (!isset($_REQUEST['content'])) {
$nextPage = "main";
} else {
$nextPage = $_REQUEST['content'] ;
}
if($nextPage != "gallery") {
include("content/" . $nextPage. ".inc.php");
}(#10850)
Re: PHP Notice: Undefined index: content in... Please help
Thank you very much 