How to pass parameters from one page to other using links

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
Safwi
Forum Newbie
Posts: 3
Joined: Fri Mar 13, 2009 4:37 am

How to pass parameters from one page to other using links

Post by Safwi »

Can some one help in passing parameters from one page to another using Links. I don't want to use submit buttons on form.

Safwi
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: How to pass parameters from one page to other using links

Post by papa »

Code: Select all

<a href="page.php?var1=x&var2=y&var3=z">link</a>
Safwi
Forum Newbie
Posts: 3
Joined: Fri Mar 13, 2009 4:37 am

Re: How to pass parameters from one page to other using links

Post by Safwi »

thanks alot. I am new to web programming and am sure that u wouldn't be harsh with my stupid questions.
can u plz. tell me how to receive the value on page2.php. can i receive it through $_get['var1'] as with forms or through some other way.


Safwi
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: How to pass parameters from one page to other using links

Post by Benjamin »

Forum Rules wrote: 11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
You may also want to read:
  1. General Posting Guidelines
  2. Posting Code in the Forums
  3. PHP Manual
  4. PHP Tutorials
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: How to pass parameters from one page to other using links

Post by susrisha »

yes you can receive them as get variables.
Post Reply