LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Parameter passing in HTML (http://www.linuxquestions.org/questions/programming-9/parameter-passing-in-html-813629/)

john2 06-11-2010 06:16 PM

Parameter passing in HTML
 
If I have the following links in HTML
Code:

  <a href=lang.php?lang=cymraeg>Cymraeg</a>
  <a href=lang.php?lang=english>English</a>

and lang.php has a link to page2.html, how do I pass on the value of the lang parameter from lang.php to page2.html? The value needed is the one passed in to lang.php.

NightHorse 06-11-2010 09:14 PM

Since you are using PHP, it could be done with it.

Code:

<a href=page2.php?lang=<?php echo $_GET["lang"]; ?>>Page2</a>
Please google for $_GET and $_POST for farther details.

NightHorse 06-11-2010 09:14 PM

Sorry for the duplicate post. My slow connection's bad.. !!

Please moderators delete this one.

john2 06-12-2010 04:22 PM

Problem solved - thanks.


All times are GMT -5. The time now is 02:58 AM.