RE: what's all the about then?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do this.

1. Create a script called hello.php with the following content:

<?php
echo $_GET['string'];
?>

2. Enter http://yoururl/hello.php?string=Hello

3. The page will say "Hello"

The content after the ? will be treated as GET variables in the http request
to the server. You can use this to change behavior of a script depending on
what the GET variables values are.

/Peter


-----Original Message-----
From: Ross [mailto:ross@xxxxxxxxxxxxx] 
Sent: Wednesday, August 30, 2006 7:10 PM
To: php-general@xxxxxxxxxxxxx
Subject:  what's all the about then?

There is a site which has interesting behaviour.

http://myurl.co.uk/index.php?p=latest

when I click the links the variable and the end changes changing the page.

http://myurl.co.uk/index.php?p=news

Can someone tell me

(i) how is this achived
(ii) what is the technique called
(iii) does it have any real benefits apprt from looking a bit nifty


Ross 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux