|
Posted by Jerry Stuckle on 08/20/07 01:16
Galatorg@gmail.com wrote:
> On Aug 19, 5:05 pm, gordonb.66...@burditt.org (Gordon Burditt) wrote:
>>> How do I have my whole site on one page of PHP and to get to the pages
>>> would be something like
>>> domain.com/index.php?page1
>>> domain.com/index.php?page2
>> You can get hold of the part of the query after the ? with:
>>
>> $_SERVER['QUERY_STRING']
>> but that also includes GET or POST variables, if any, which you'd need
>> to remove. It might be easier to make your URL of the form:
>>
>> domain.com/index.php?p=page1
>>
>> and retrieve it with $_REQUEST['p'] .
>>
>> After you get the value into a variable, you can use something like:
>>
>> switch($_REQUEST['p']) {
>> case 'page1': /* code for page 1 goes here */
>> break;
>> case 'page2': /* code for page2 goes here */
>> break;
>> default: /* code for unexpected page goes here */
>> break;
>> }
>
>
> It doesn't seem to be working.
>
Did you actually put your code in there?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|