Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


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: 132

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.


Sponsor:

#2 ApochPiQ   Moderators   -  Reputation: 17224

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.




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