Menu Question


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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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>


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.