Jump to content

  • Log In with Google      Sign In   
  • Create Account

Can you store a javascript in a php session variable


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 Brainx7   Members   -  Reputation: 136

Like
0Likes
Like

Posted 01 July 2014 - 08:26 PM

for example

 

<script>
var a="Hello";
</script>


Edited by Brainx7, 01 July 2014 - 08:30 PM.


#2 ApochPiQ   Moderators   -  Reputation: 20447

Like
2Likes
Like

Posted 01 July 2014 - 08:39 PM

Assuming I understand your question correctly, then yes, you can store any string in a PHP session variable. But this is probably a bad idea.

A better approach is to store some kind of value in the session variable which you then use to decide what script to emit to the client.
Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.




PARTNERS