Question regarding and include() functions and commands
Posted: Wed Aug 15, 2007 12:14 pm
Hi,
I've run into some trouble while developing a site for a friend of mine.
He plans to present his gallery of antiques to people at an expo, and he needs a web site up and running in a few days form now.
I have made a template and several otherpages that could be changed on the same php file using the
switch ($_GET[blah]) and include() functions.
I don't have problem when clicking on links of static/html based pages, but have an issue when I click on links that that include dynamic php files that require a "?comand_line".
When I click on link that includes a php file. It's fine...but when I click on imges and links in the gallery that have included, it just returns to the front page. Abvioulsy It donesn't accept the commands for the php file that I've included.
here's my site I'm working on (for now, all of the links on the top are the some. they all include the gallery. After you click on one of those links, then try clicking the ones that appear on the left side of the screen. Those are the ones I'm trying to get to work.):
http://frickenawesome.org/demo_1
here's the main peice of code I use in my index.php page:
-Mike
I've run into some trouble while developing a site for a friend of mine.
He plans to present his gallery of antiques to people at an expo, and he needs a web site up and running in a few days form now.
I have made a template and several otherpages that could be changed on the same php file using the
switch ($_GET[blah]) and include() functions.
I don't have problem when clicking on links of static/html based pages, but have an issue when I click on links that that include dynamic php files that require a "?comand_line".
When I click on link that includes a php file. It's fine...but when I click on imges and links in the gallery that have included, it just returns to the front page. Abvioulsy It donesn't accept the commands for the php file that I've included.
here's my site I'm working on (for now, all of the links on the top are the some. they all include the gallery. After you click on one of those links, then try clicking the ones that appear on the left side of the screen. Those are the ones I'm trying to get to work.):
http://frickenawesome.org/demo_1
here's the main peice of code I use in my index.php page:
Code: Select all
<table class="main" width="100%" height="573" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="banner" width="100%" height="115" valign="top">
<a href="?p=home">home page</a> | <a href="?p=about">info</a></td>
</tr>
<tr>
<td class="links" width="100%" height="25">
<a href="?p=products">Antiques</a>  |  <a href="?p=products">Aubussons</a>  |  <a href="?p=products">Tapestries</a>  |  <a href="?p=products">Savonneries</a>  |  <a href="?p=products">Textiles</a></td>
</tr>
<tr>
<td class="content" width="100%" height="100%" valign="top">
<?php
switch ($_GET[p]){
case "home":
include 'home.inc';
break;
case "products":
include 'gallery/gallery.php';
break;
case "about":
include 'about.inc';
break;
case "history":
include 'history.inc';
break;
case "services":
include 'services.inc';
break;
case "exh":
include 'exhabitions.inc';
break;
case "contact":
include 'contacts.inc';
break;
default:
include 'home.inc';
}
?>
</td>
</tr>
<tr>
<td class="footer" width="100%" height="25">
<a href="?p=home">Home</a>  |  <a href="?p=history">History</a>  |  <a href="?p=services">Services</a>  |  <a href="?p=exh">Exhabitions</a>  |  <a href="?p=contact">Contacts</a>
</td>
</tr>