thegadgitman Posted February 7, 2010 Share Posted February 7, 2010 I have a few pieces of script that have to interact with each other. The 1st script makes up some variables and these have to be passed to other scripts. I am having problems getting them into the other script. Say Script1.php makes variables $a1 $a2 $a3 Srcipt2.php needs to read these indipendantly of script1.php Any help would be great. I do know the post and get commands but dont seem to be able to get them to work. An example would be great. THANKS. Link to comment https://forums.phpfreaks.com/topic/191242-passing-variables-accross-php-scripts-help-please/ Share on other sites More sharing options...
jl5501 Posted February 7, 2010 Share Posted February 7, 2010 You would need to let us know what the interaction between the scripts is. does one call the other? is a form involved? Other then that, your best solution is to use sessions where in both scripts you start with session_start(); and in one you say $_SESSION['a'] = $a; and in the other you say $a = $_SESSION['s']; Link to comment https://forums.phpfreaks.com/topic/191242-passing-variables-accross-php-scripts-help-please/#findComment-1008344 Share on other sites More sharing options...
thegadgitman Posted February 7, 2010 Author Share Posted February 7, 2010 I have done it. THANKS. Link to comment https://forums.phpfreaks.com/topic/191242-passing-variables-accross-php-scripts-help-please/#findComment-1008346 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.