Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Can you store a javascript in a php session variable

4: Adsense

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   

144
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   

22556
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.