treehouse : what would you like to learn today?
Web Design Web Development iOS Development

accessing variables

  • How can i get access to the javascript variables in PHP?

  • You can not.

    JavaScript runs on the user's browser, long after PHP has stopped running on your server.

    You can use Ajax to submit values to a PHP script and return the results. However, the two languages cannot actually interact.