Hi all, I've been given the lovely task of re-doing our company website using PHP.
I've never used it before and am finding it a little hard going at the moment.
Basically my main page is set out into five sections by using 'include', theres a header, footer, leftside menu, rightside column and a middle section which are positioned using a style sheet. What I want to be able to do is have the middle section display different php files depending on what option is chosen from my menu.
The current website uses ASP and i've seen that the format is along the line of:
Dim variable
variable =Request.QueryString("subpage")
(where "subpage" is defined in the a href line in the menus ASP file)
This is where i seem to be struggling. Below is an example of a section from my mainmenu file:
<li>
<a href="">Services</a>
<ul>
<li>
<a href="GrpServ.php?subpage=GrpServ">Groupage & Full Loads</a>
</li>
</li>
There will be other menu options to come but for now it would be nice to be able to to just get one to work. Below is what i've tried to do so far. Believe it or not i have been doing a fair amount of searching for the best way to accomplish what i want:
<div id="mid">
<?php
$GET['subpage'];
if($GET['subpage'] == "GrpServ")
include './GrpServ.php'
?>
</div>
Bad coding aside, will I have problems if i'm trying to look for the 'GrpServ' from another PHP file or should it not matter.
Any help would be appreciated. I hate to sound pathetic but this bit is stopping me from progressing much further with the rest of the site.
Many thanks
Fingerbob