Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-30-2012, 04:45 PM   PM User | #1
wylie233
New Coder

 
Join Date: Jul 2012
Location: UK
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
wylie233 is an unknown quantity at this point
Cool url types :)

HI there,

i have come across:

a) ...........index.php?page=nothing

instead of:

b) ......../nothing.php


when i tried doing "a" it did not work, it just stayed on the index.php!
So, how do i go about using the first technique? And how does it work?
Thanks!!!
wylie233 is offline   Reply With Quote
Old 09-30-2012, 06:25 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
That simply accepts the querystring into index.php. You then need to program what to do with it:
PHP Code:
if (isset($_GET['page']))
{
    switch (
$_GET['page'])
    {
        case 
'nothing':
            
header('Location: http://yoursite.com/nothing.php');
            exit();
            break;
    }

For example.
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:19 PM.


Advertisement
Log in to turn off these ads.