Hi, I have calculated a value and saved it in $answer in script1.php. Script1.php now calls script2.php. How can I acces this value of $answer in script2.php?
Sorry for the stupid question. Thanks
Originally posted by Dawie Script1.php now calls script2.php. How can I acces this value of $answer in script2.php?
How does Script1 call script2? Is it via a form action? If so, just hide the value of $answer in a hidden form field.
<input type='hidden' name='answer' value='<?php echo $answer; ?>'>
You can also embed $answer in the URL
<a href="script2.php?ans=<? echo $answer ; ?>">Script 2</a>