CoreyR Posted May 25, 2007 Share Posted May 25, 2007 I have a PHP file which grabs data from my SQL server and I need to pass it to another PHP file without using URL passing. Any ideas how I would do this? Thank You, Corey R. Quote Link to comment https://forums.phpfreaks.com/topic/52999-passing-variables/ Share on other sites More sharing options...
pocobueno1388 Posted May 25, 2007 Share Posted May 25, 2007 Hidden form input or through a session. Quote Link to comment https://forums.phpfreaks.com/topic/52999-passing-variables/#findComment-261821 Share on other sites More sharing options...
konnwat Posted May 25, 2007 Share Posted May 25, 2007 hehe i was going to say through a session but i was beaten too it xD <?php session_start(); $_SESSION['key'] = 'value'; //in the other php file you can put session_start(); $var = $_SESSION['key']; ?> Quote Link to comment https://forums.phpfreaks.com/topic/52999-passing-variables/#findComment-261823 Share on other sites More sharing options...
CoreyR Posted May 25, 2007 Author Share Posted May 25, 2007 Sorry I should have explained in more detail. My first script is automatically run every 12 hours on the server. It calls a second script which grabs data. The second script needs to pass the data back to the first script. The variables will be passed on the back end and not by using a browser. Sorry Quote Link to comment https://forums.phpfreaks.com/topic/52999-passing-variables/#findComment-261832 Share on other sites More sharing options...
per1os Posted May 25, 2007 Share Posted May 25, 2007 Sounds like you need a table in the DB that should contain the data and the first script will read that data from that and the second script sets the data in that table. Quote Link to comment https://forums.phpfreaks.com/topic/52999-passing-variables/#findComment-261835 Share on other sites More sharing options...
CoreyR Posted May 25, 2007 Author Share Posted May 25, 2007 That's what I said, but the site admin will not allow anymore data in the SQL server. Maybe I will just write everything in one file. Quote Link to comment https://forums.phpfreaks.com/topic/52999-passing-variables/#findComment-261838 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.