dukesdemise Posted June 1, 2010 Share Posted June 1, 2010 What I would like to do is share a global variable between scripts, without using a $_SESSION variable. Is this possible? Quote Link to comment https://forums.phpfreaks.com/topic/203581-sharing-php-globals-between-scripts/ Share on other sites More sharing options...
marcus Posted June 1, 2010 Share Posted June 1, 2010 You can use a database... or a flat file. Quote Link to comment https://forums.phpfreaks.com/topic/203581-sharing-php-globals-between-scripts/#findComment-1066385 Share on other sites More sharing options...
JD* Posted June 2, 2010 Share Posted June 2, 2010 Or, if it's not something that needs to be secure, pass it to the URL Quote Link to comment https://forums.phpfreaks.com/topic/203581-sharing-php-globals-between-scripts/#findComment-1066435 Share on other sites More sharing options...
PFMaBiSmAd Posted June 2, 2010 Share Posted June 2, 2010 The only information the server receives that ties any http request to any other http request is what the browser supplies. You can directly pass information between http requests by using cookies, post data (assuming you have a form), or as get data (as part of the URL.) You can indirectly pass information between requests using sessions or by passing some other unique id as part of the http request that is then tied to data you have stored somewhere on the server that is associated with that unique id. Quote Link to comment https://forums.phpfreaks.com/topic/203581-sharing-php-globals-between-scripts/#findComment-1066766 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.