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
Re: global var vs session vs something else maybe? [message #169842 is a reply to message #169840] Tue, 28 September 2010 05:11 Go to previous message
rf is currently offline  rf
Messages: 19
Registered: September 2010
Karma:
Junior Member
"Kentor" <kentor(at)gmail(dot)com> wrote in message
news:7d069665-e87d-4b99-97db-951c1ebba992(at)q2g2000vbk(dot)googlegroups(dot)com...
> 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?

Session cookies. It's all in the manual.
[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: Wed Nov 27 11:57:33 GMT 2024

Total time taken to generate the page: 0.04038 seconds