Re: [PHP] Variable Help.

2002-05-01 Thread Stuart Dallas

On 1 May 2002 at 18:39, Randum Ian wrote:
 I want to link to a page like this:
 
 http://www.danceportal.co.uk/charts.php?wk0001-fri-18-jan-2002
 
 How do I get the information into a script?

The variable $_SERVER[QUERY_STRING] will contain wk0001-fri-18-jan-2002.

-- 
Stuart

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




RE: [PHP] Variable Help.

2002-05-01 Thread Jay Blanchard

[snip]
I want to link to a page like this:

http://www.danceportal.co.uk/charts.php?wk0001-fri-18-jan-2002

How do I get the information into a script?
[snip]

Since you want to pass 'wk0001-fri-18-jan-2002' as the variable value your
URL will need to look like this

http://www.danceportal.co.uk/charts.php?varname=wk0001-fri-18-jan-2002

varname=wk0001-fri-18-jan-2002 where varname is the variable name and
wk0001-fri-18-jan-2002 is the variable value.

In the next page the value will be available in the variable $varname

Jay Blanchard



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




RE: [PHP] Variable Help.

2002-05-01 Thread Miguel Cruz

On Wed, 1 May 2002, Jay Blanchard wrote:
 http://www.danceportal.co.uk/charts.php?varname=wk0001-fri-18-jan-2002
 
 varname=wk0001-fri-18-jan-2002 where varname is the variable name and
 wk0001-fri-18-jan-2002 is the variable value.
 
 In the next page the value will be available in the variable $varname

Or, if you have a recent PHP installation with default parameters, it will 
show up as $_GET['varname'].

miguel


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




Re: [PHP] Variable Help.

2002-05-01 Thread J Smith


Even better would be to write the URL as

http://www.example.com/charts.php/wk0001-etc

and look in $_SERVER[PATH_INFO]. This way, you can do without the ? and 
have a search engine-friendly URL.

J


Stuart Dallas wrote:

 On 1 May 2002 at 18:39, Randum Ian wrote:
 I want to link to a page like this:
 
 http://www.danceportal.co.uk/charts.php?wk0001-fri-18-jan-2002
 
 How do I get the information into a script?
 
 The variable $_SERVER[QUERY_STRING] will contain
 wk0001-fri-18-jan-2002.
 


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




Re: [PHP] Variable Help.

2002-05-01 Thread Miguel Cruz

On Wed, 1 May 2002, J Smith wrote:
 Even better would be to write the URL as
 
 http://www.example.com/charts.php/wk0001-etc
 
 and look in $_SERVER[PATH_INFO]. This way, you can do without the ? and 
 have a search engine-friendly URL.

...and all your relative URLs get broken so you have to either have an 
implementation-specific BASE HREF or use (ugh) absolute URLs.

miguel


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




Re: [PHP] Variable Help.

2002-05-01 Thread J Smith


It isn't terribly hard to fix -- just use $_SERVER[DOCUMENT_ROOT] in the 
links that need them.

J


Miguel Cruz wrote:

 On Wed, 1 May 2002, J Smith wrote:
 Even better would be to write the URL as
 
 http://www.example.com/charts.php/wk0001-etc
 
 and look in $_SERVER[PATH_INFO]. This way, you can do without the ?
 and have a search engine-friendly URL.
 
 ...and all your relative URLs get broken so you have to either have an
 implementation-specific BASE HREF or use (ugh) absolute URLs.
 
 miguel


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