Submit two commands on one click

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
albatros
Forum Newbie
Posts: 3
Joined: Tue Apr 23, 2002 1:29 am

Submit two commands on one click

Post by albatros »

Hi,

Iam feeling a litle stuped when i type this question, but ok excuse me :lol:

Does any body know the right code to submit the following with one click:

<a href="index.php?newlang=english"></a>
<a href=javascript:history.back(-1)></a>

This wont work:
<a href="index.php?newlang=english"+"javascript:history.back(-1)"></a>

The goal is to change the lanuage on my board by submit the newlang
code from the index, and go one step back (where you submit the button)

Thanks ahead,
Greetinx,
Hans
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

in your index.php, in the section that deals with the newlang variable, do a redirect to the page you wish to go to.

i.e.

Hearder("Location: http://www.yourdomain.com/index.php");
dusty
Forum Contributor
Posts: 122
Joined: Sun Apr 28, 2002 9:52 pm
Location: Portsmouth, VA

Post by dusty »

header("location: $REFERER");
Post Reply