FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » global var vs session vs something else maybe?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
global var vs session vs something else maybe? [message #169840] Tue, 28 September 2010 04:34 Go to previous message
Kentor is currently offline  Kentor
Messages: 5
Registered: September 2010
Karma:
Junior Member
Hello,

I'm running a query in initialFile.php which then displays some
information on the page. Later, the user has the option of clicking on
a load button, which loads a map to display this information on a
Google map.

initialFile.php has a query (that I need sometime later) and this page
has a button which runs a javascript function in loadMap.js which
makes an AJAX call to another file ajaxFile.php (where I need the
query so I can run it again).
I don't want the user to be able to see the query through cookies or
anything unsafe for the site.

My question is the following, is there a way to create a global
variable in initialFile.php and then access it in ajaxFile.php ? If
so, how would I do it? I have tried and failed using several options.
Is it better to just use a session to pass that query?
Would you have any better ways of doing this?

Thank you so much!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to match image file names under a directory with glob()
Next Topic: PHP manual note
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 12:22:51 GMT 2024

Total time taken to generate the page: 0.04266 seconds