Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send/retrieve Variable to another html page

Status
Not open for further replies.
use javascript:
<script>
alert(location.search)
</script>

Known is handfull, Unknown is worldfull
 
If the variables are critical, then consider the fact that 5% of users have JavaScript switched off (source: The Counter).

The way most web sites do it is to use a server side technology. Here's a php example.
Code:
<a href="page.php?var1=100">Next page</a>

<?php
  $myvar1 = $_GET['var1'];
  print "<p>Variable 1 is: ".$myvar1."</p>";
?>

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top