Jump to content


Photo

Exchange data Javascript to PHP in the $_SESSION array


  • Please log in to reply
2 replies to this topic

#1 ronverdonk

ronverdonk
  • Members
  • PipPipPip
  • Advanced Member
  • 277 posts
  • LocationNetherlands

Posted 10 September 2006 - 02:28 PM

Is it possible to pass data from a JavaScript function to the $_SESSION array, so it can be picked up by a PHP script?
I'd be grateful for any help on this.

Ronald  8)
RTFM is an almost extinct art form, it should be subsidized.

#2 radalin

radalin
  • Members
  • PipPipPip
  • Advanced Member
  • 179 posts

Posted 10 September 2006 - 04:04 PM

I do not think that it's possible as js is only a browser side script language.

But you can use XMLHTTPReqeust object to send data to a php function which will set the session variable for you and then you can use that variable. It's ajaxian approach by the way
Roy Simkes
Yet Another Parkyeri Developer

#3 ronverdonk

ronverdonk
  • Members
  • PipPipPip
  • Advanced Member
  • 277 posts
  • LocationNetherlands

Posted 10 September 2006 - 04:17 PM

Thanks. I will investigate Ajax for this.

Ronald   8)
RTFM is an almost extinct art form, it should be subsidized.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users