jQuery variable pass to PHP variable

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2192
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Tue Aug 09, 2011 4:51 am

JQuery = Client
PHP = Server.

In order to get it from jQuery, you'll have to make a post/get to the server, then PHP can retrieve it. It won't happen on initial page load.

User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2192
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Tue Aug 09, 2011 4:52 am

You can however use AJAX to post the code on the same page, saving whatever it is you're looking for as a SESSION variable.

I don't have time nor the exact knowledge on how to do it, but I am fairly certain that's your only option.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest