Click to See Complete Forum and Search --> : link with value...


daimous
01-02-2005, 10:03 PM
can any one pls. help me...

supposing i have this 2 page:
--------------------------------------------------
Page1.php contains...

<?print "<a href='page2.php'>Click Me</a>";?>

and page2.php contains...

<?
print "variable 1 contains: " .$pass_var1 ."<br>";
print "Variable 2 contains: " .$pass_var2 ."<br>";
?>


------------------------------------------------------
the question is, how can i assign value to $pass_var1 and $pass_var2
from Page1.php when i click the link 'Click Me'? any help will be appreciated....tnx! in advance!!!!

MstrBob
01-02-2005, 10:12 PM
Page 1:

<a href="page2.php?var1=foo&var2=bar">Click Me</a>

Page 2:


echo('Variable 1 contains '.$_GET['var1']);
echo('Variable 2 contains '.$_GET['var2']);

daimous
01-02-2005, 10:17 PM
i got it!!! tnx! a lot!!!!