Question about php variables
What is the most convenient way to carry a variable, which was defined in a previous php script, into another php script?
For example, if this variable : $dbname=$_GET['dbname']; is defined in the present php script, how would you carry this variable to a php script which is executed next, without having to write this variable's contents to a file and read from the file ? JC |
What do you mean 'executing next'? You click on a url to execute the next script, or what?
|
Sorry I left that out. The next script is called when you click a button.
script1 : enter info into a text box, click button, store variable for script 2. script2 : enter info into a text box, click button, store variable for script 3. script3 : use variable from script 2, and script 1. My dilema is that I am trying to get info entered into a text box in script 1, and use it in script 3. JC |
well... you can use the 'hidden' option...i.e.
<input type=hidden name=v_from_script1 value=The_VALUE> <input type=hidden name=v_from_script2 value=The_VALUE> ... ... <input type=submit> then, when you get script 3 just pull them out |
yeah, the hidden button works beautifully. OR, you coudl always use session variables, whcih are global throughout the domain
|
Thanks alot for the help.
JC |
All times are GMT -5. The time now is 12:25 AM. |