Jump to content

Javascript_PHP


x_maras

Recommended Posts

ok, you don't want to echo all the data to the page for JavaScript to access it, UNTIL the button is pressed I'm assuming?

 

Well, PHP is a server side processor, so basically, once JavaScript is started, PHP is already closed, and all the variables/resources/etc are destroyed and inaccessible..

 

What you could do, is set up some AJAX and everytime the button is pressed, connect to another php page, which it will still be within the same browser so the session will still be active.. just echo the data of the session into that php and then AJAX will retrieve it and you can play with it all you want once AJAX has it.

Link to comment
https://forums.phpfreaks.com/topic/148209-javascript_php/#findComment-777990
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.