01-29-2010, 05:36 PM
|
#1 (permalink)
|
|
The Visitor
Join Date: Jan 2010
Posts: 1
Thanks: 0
|
global variables
Hi all,
I need help on this:
How do I pass a value from one variable to another variable upon users click?
example:
I have following html site
Code:
<html>
<head>
</head>
<body>
<?php
myGloablVarA=var1;
myGloablVarB=var2;
myGloablVarC=var3;
?>
<?php
some php codes here
how do make a function here (onclick) change those Global Variable defined above(myGloablVarA,myGloablVarB,myGloablVarC)
to new values thats been generated upon user click?
currently I am posting the value to url location
echo'<a href=\"detail.php?id=$var1.$var2.$var3\">
instead of posting the values to url location I
would like values to be stored in global varaibles and....
?>
<?php
.....read the values back here again
myVarnew1=myGloablVarA; // assign new values from myGloablVarA
myVarnew2=myGloablVarB;
myVarnew3=myGloablVarC;
?>
</body>
</html>
many thanks..I would be very glad on any tips
reverse
|
|
|
|