get parameters

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
cohq82
Forum Commoner
Posts: 43
Joined: Mon Apr 21, 2008 8:38 pm

get parameters

Post by cohq82 »

Hi all, I have this question and I may use the wrong language. So i am sorry about that. Basically, I have this website which I am building a mod to show in English and AnotherLanguage. There will be a button to change the language. When visitors click the button, it will refresh the page and change the language.

The implementation method I tried to follow was: create that new button and add a parameter in the link such as lang=en or lang=other. However, the page could have many other parameters. The questions are:

1. How to get all the parameters in the current page?
2. If exist lang=xxx, how to get the value and remove it from the current page?

The purpose is to add

<A href="www.website.com/index.php?para1=xxx&par ... ">Language Button</A>

in the new page as the hack!

Please let me know how to do this.

Otherwise, I am open to other alternatives.


Thanks again!!
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: get parameters

Post by Zoxive »

Sessions/Cookies are more appropriate.
Post Reply