|
So, you want to store your JS variables in MySQL or you want to read MySQL variables to use them in JavaScript?
First of all you have to understand the principals of JavaScript and PHP and the Internet. JavaScript is interpreted on the client. PHP on the server, which will then send you the completed HTML output to display. You can not dynamically change what PHP sent you without reloading the page. That's the "problem" of the internet. Luckily there is a technology called AJAX which can load a page directly from javascript which allows you to dynamically change the page without reloading. Whatever you want to do, you need AJAX for it.
|