When I enter the url
http://localhost/content.php?cat=5&id=7
I want to access the page
http://localhost/contant.php
which has a code snippet in it..
<?php
$cat=$HTTP_POST_VARS['cat'];
$id=$HTTP_POST_VARS['id'];
if (!$cat){
$pagename="error404.php";
$pagetitle="Page Not Found";
}else{
include("dbconnect.php");
include ("mypage" . $cat . $id");
}
?>
The page is there. And it works fine when online. But on Local host it doestn works and display and error page which I have set to error404.php.
If i dont use a custom error page this error is obtained
Warning: main(): Failed opening '' for inclusion (include_path='.;c:\php4\pear') in F:\Projects\myprojects\site\content.php[/url] on line 51
If Instead of posting variables cat and id through url , i define then within code the page works fine. It means some thing is wrong with posting of variables...
Code with which page works fine
<?php
//$cat=$HTTP_POST_VARS['cat'];
//$id=$HTTP_POST_VARS['id'];
$cat='5';
$id='7';
if (!$cat){
$pagename="error404.php";
$pagetitle="Page Not Found";
}else{
include ("dbconnect.php");
include ("mypage" . $cat . $id");
}
?>