-   Programming (
-   -   Parameter passing in HTML (

john2 06-11-2010 07:16 PM

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

  <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 10:14 PM

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


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

NightHorse 06-11-2010 10:14 PM

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

Please moderators delete this one.

john2 06-12-2010 05:22 PM

Problem solved - thanks.

All times are GMT -5. The time now is 05:04 AM.