RE: [PHP] how to reload a PHP page via PHP code

2006-04-14 Thread Jay Blanchard
[snip]
I would like to know if it exist a method to reload a PHP page via PHP
code
?
the topic behind is that i do not want to specify the PHP page to
reload.

It must reload the actual page only.
for example, if use views the page : test.php and click on US flag
image.
PHP should reload this page with US language...but i do not want to
write in
hardcoding the page name, because this function should be usefull for
all
pages.
[/snip]

Just how much time do people spend reading the manual?

There is a pre-defined variable called $_SERVER['PHP_SELF'] you may also
want to look at things like basepath etc.

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



Re: [PHP] how to reload a PHP page via PHP code

2006-04-14 Thread Richard Collyer

Alain Roger wrote:

Hi,

I would like to know if it exist a method to reload a PHP page via PHP code
?
the topic behind is that i do not want to specify the PHP page to reload.

It must reload the actual page only.
for example, if use views the page : test.php and click on US flag image.
PHP should reload this page with US language...but i do not want to write in
hardcoding the page name, because this function should be usefull for all
pages.



Although the question is vague here I go.

I would use sessions to determine what language is displayed.

When the user clicks the flag then the php page it goes to sets a 
language var in the session and redirects back to the original page that 
the user was on.


Richard

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



RE: [PHP] how to reload a PHP page via PHP code

2006-04-14 Thread Jay Blanchard
[snip]
Sorry, but i do not find it in my PHP manual :-(
[/snip]

http://www.php.net/manual/en/reserved.variables.php

It is actually the first one mentioned on the page. :(

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



Re: [PHP] how to reload a PHP page via PHP code

2006-04-14 Thread benifactor
i reload my pages with a function using a meta tag...

?php
// $sec is the amount of seconds you want to wait before it redirects
//$url id the pace you want it to redirect to
function redirect ($sec, $url) {

?

meta http-equiv=refresh content=?=$sec;?;URL=?=$url;?

?php
}

//to use to refresh a page
$url = $_SERVER['PHP_SELF'];
redirect(0, $url);
?
- Original Message - 
From: Jay Blanchard [EMAIL PROTECTED]
To: Alain Roger [EMAIL PROTECTED]
Cc: PHP General List php-general@lists.php.net
Sent: Friday, April 14, 2006 9:45 AM
Subject: RE: [PHP] how to reload a PHP page via PHP code


[snip]
Sorry, but i do not find it in my PHP manual :-(
[/snip]

http://www.php.net/manual/en/reserved.variables.php

It is actually the first one mentioned on the page. :(

-- 
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