We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Menu Question

NTGrE asked
Medium Priority
Last Modified: 2010-04-09

I m trying to build a basic page that uses this as menu..

<table width="120" height="100" border="3" cellpadding="1" cellspacing="3" bordercolor="#FF0000" bgcolor="#00FF00">
    <td bgcolor="#999999"><div align="center">Menu</div></td>
    <td bordercolor="#FF0000" bgcolor="#CCCCCC"><div align="center"><a href="index1.php?page=homebody">Home</a></div></td>
    <td bgcolor="#CCCCCC"><div align="center"><a href="index1.php?page=register">Register</a></div></td>
    <td bgcolor="#CCCCCC"><div align="center"><a href="index1.php?page=search">Search</a></div></td>

and in my index i m using this to display each selected page in the body..

if (isset($_GET['page'])) {
  if (in_array($page,array('home','register','search'))) {
else {
include ("$page.php");

Everything seems that working fine but when i m in my search page and i search for a keyword i m taking this error

Warning: main(home.php) [function.main]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\vilyl\Templates\index1.php on line 30

Warning: main() [function.include]: Failed opening 'home.php' for inclusion (include_path='.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\vilyl\Templates\index1.php on line 30

where line 30 ==> include ("$page.php");

When i first open my searchALL.php page in my browsers adress bar displayed
and when i search for a keyword ex----> italo

Any idea HOW to solve this????

Thnx for your time
Watch Question

Hey, "homebody.php" and "home.php" are different page? Maybe you only a homebody.php, so you get the error.

<td bordercolor="#FF0000" bgcolor="#CCCCCC"><div align="center"><a href="index1.php?page=homebody">Home</a></div></td>

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.