It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Back buton - several pages back - in HTML ?

Back buton - several pages back - in HTML ?

Postby attila001122 on Sun Dec 09, 2007 2:39 pm

Hello,

I dont know if someone had the same problems, but it seem to me that it is quite common.

For a service I would offer my visitors to log in or register...
Then after registering or logging in I would like to direct them back to the page where they had been diverted from.
And the number of steps and the page are not always the same.

Is there a way to "remember" the page name when click on register or login and at the end of the reg/log process go back there?

Thanks


Attila
:?
attila001122
 
Posts: 7
Joined: Sun Dec 09, 2007 2:35 pm

Postby flabbyrabbit on Sun Dec 09, 2007 3:29 pm

Google "php sessions", that should help you out.

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Back buton - several pages

Postby kalaid on Tue Dec 11, 2007 12:16 pm

Hi,
I want to know in detail. Please explain me with an example how to do this with 'php sessions'.
kalaid
 
Posts: 2
Joined: Wed Aug 08, 2007 7:09 am

Postby attila001122 on Tue Dec 11, 2007 2:35 pm

Yes...

Do I need to install PHP and local server and mysql, or there is a simple code I can paste?

Thanks
attila001122
 
Posts: 7
Joined: Sun Dec 09, 2007 2:35 pm

Postby knowa on Tue Dec 11, 2007 4:11 pm

Well, your webserver will need php, mysql is not required. But - why don't you just use Javascript?
User avatar
knowa
 
Posts: 19
Joined: Sat Dec 08, 2007 4:32 pm
Location: Switzerland

Postby flabbyrabbit on Tue Dec 11, 2007 4:34 pm

Ok how would you do it in javascript??

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby knowa on Tue Dec 11, 2007 6:36 pm

Just history.back(1) or history.back(2) or whatever.. :)
User avatar
knowa
 
Posts: 19
Joined: Sat Dec 08, 2007 4:32 pm
Location: Switzerland

Re: Back buton - several pages back - in HTML ?

Postby flabbyrabbit on Tue Dec 11, 2007 6:39 pm

attila001122 wrote:And the number of steps and the page are not always the same.

So your way would not work, you would need to save the page they were on and then link back to it at the end of the registration

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby attila001122 on Tue Dec 11, 2007 7:09 pm

knowa wrote:Well, your webserver will need php, mysql is not required. But - why don't you just use Javascript?


Ok...

Funny, every time I was trying to install PHP somehow I could not avoid to get involved with mysql... and mostly went wrong...
On this machine I have not attempted yet.

Anyway...

My server does supports PHP...
Do you know where can be found the code ?
attila001122
 
Posts: 7
Joined: Sun Dec 09, 2007 2:35 pm

Postby flabbyrabbit on Tue Dec 11, 2007 11:23 pm

Well you want to save the page that they registered from to a session, then at the end of the registration process to go back to that page.
The two things you will need to know is:
    PHP sessions
    PHP header redirect


Search those two on google and you should be able to work it out, if not then ask me again.

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Next

Who is online

Users browsing this forum: No registered users and 1 guest