Re: [PHP] codes in php for going back to previous page

2001-09-21 Thread Tamas Arpad

On Thursday 20 September 2001 21:36, Wee Chua wrote:
 Hi all,
 I know how to forward a page with PHP, but what if the page I want
 to forward is the previous page or last page. In javascript, the
 code is like javascript:historygo(-1). The reason why I want to go
 back to previous page is because I don't want to lose any
 information on previous page. Can anyone help? Thank you.
Try with this:
html
body
  script language=javascript
history.go(-2)
  /script
/body
/html

I've never tried it, but as I think the browser should go back to the 
previous page (actually when this page is loaded it is located on 
-2nd position).
Arpi

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Codes in PHP

2001-09-20 Thread Jason Bell

SARCASM hey, maybe if you post this 10 more times, someone will answer
it... /SARCASM

This is a good list, if someone has an answer, you will probably get it. You
don't need to post the same question multiple times. All that does is annoy
the hell out of people.


- Original Message -
From: Wee Chua [EMAIL PROTECTED]
To: PHP (E-mail) [EMAIL PROTECTED]
Sent: Thursday, September 20, 2001 12:49 PM
Subject: [PHP] Codes in PHP


 Hi all,
 I know how to forward a page with PHP, but what if the page I want to
 forward is the previous page or last page. In javascript, the code is like
 javascript:historygo(-1). The reason why I want to go back to previous
page
 is because I don't want to lose any information on previous page. Can
anyone
 help? Thank you.

 Calvin Chua

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Codes in PHP

2001-09-20 Thread Jason G.

Please only post a question ONCEE

PHP does all of it's work on the server, Going back to a previous page 
(without reloading it) is done by the Web Browser.

The only way I know of is maybe to have php generate an empty page that has:
html
body onLoad=javascript:history.go(-2);
/body
/html


At 03:49 PM 9/20/2001 -0400, Wee Chua wrote:
Hi all,
I know how to forward a page with PHP, but what if the page I want to
forward is the previous page or last page. In javascript, the code is like
javascript:historygo(-1). The reason why I want to go back to previous page
is because I don't want to lose any information on previous page. Can anyone
help? Thank you.

Calvin Chua

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Codes in PHP

2001-09-20 Thread Johnson, Kirk

I only know of two ways to do page redirects with PHP: the header() function
and a META refresh tag. I suppose you could also use PHP to dynamically
generate the javascript code you included in your email. Good luck!

Kirk
 
 - Original Message -
 From: Wee Chua [EMAIL PROTECTED]
 To: PHP (E-mail) [EMAIL PROTECTED]
 Sent: Thursday, September 20, 2001 12:49 PM
 Subject: [PHP] Codes in PHP
 
 
  Hi all,
  I know how to forward a page with PHP, but what if the page 
 I want to
  forward is the previous page or last page. In javascript, 
 the code is like
  javascript:historygo(-1). The reason why I want to go back 
 to previous
 page
  is because I don't want to lose any information on previous 
 page.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Codes in PHP

2001-09-20 Thread Jason G.

Please only post a question ONCEE

PHP does all of it's work on the server, Going back to a previous page 
(without reloading it) is done by the Web Browser.

The only way I know of is maybe to have php generate an empty page html 
that has:
onLoad=javascript:history.go(-2); in the body tag


At 03:49 PM 9/20/2001 -0400, Wee Chua wrote:
Hi all,
I know how to forward a page with PHP, but what if the page I want to
forward is the previous page or last page. In javascript, the code is like
javascript:historygo(-1). The reason why I want to go back to previous page
is because I don't want to lose any information on previous page. Can anyone
help? Thank you.

Calvin Chua

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Codes in PHP

2001-09-20 Thread Sheridan Saint-Michel

I think maybe you should look at this from a different angle.

You say you want to go to the previous page because you
don't want to lose any information on the previous page.
Do you mean, for example form fields that are filled out on
previous pages?  You can pass information between pages.
This has been discussed in depth on this list many times.
Read through some of the list archives and also read the
sessions section of the manual.
http://www.php.net/manual/en/ref.session.php

If this is not your problem, then please give a better
description of the actual problem.

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


- Original Message -
From: Wee Chua [EMAIL PROTECTED]
To: PHP (E-mail) [EMAIL PROTECTED]
Sent: Thursday, September 20, 2001 2:49 PM
Subject: [PHP] Codes in PHP


 Hi all,
 I know how to forward a page with PHP, but what if the page I want to
 forward is the previous page or last page. In javascript, the code is like
 javascript:historygo(-1). The reason why I want to go back to previous
page
 is because I don't want to lose any information on previous page. Can
anyone
 help? Thank you.

 Calvin Chua

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Codes in PHP

2001-09-20 Thread Mark

On Thu, 20 Sep 2001 15:49:25 -0400, Wee Chua wrote:
Hi all,
I know how to forward a page with PHP, but what if the page I want
to
forward is the previous page or last page. In javascript, the code
is like
javascript:historygo(-1). The reason why I want to go back to
previous page
is because I don't want to lose any information on previous page.
Can anyone
help? Thank you.

Calvin Chua


you could do:
header(Location: $HTTP_REFERER);





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]