Reputation: 1
I've a div <div id="single-home-container"></div>
that displays a value from a jquery script. Can I use php to get that value so I can pass it into a mysql query?
Thanks
Upvotes: 0
Views: 290
Reputation: 60777
You should definitely take some time to learn the concept of AJAX before trying to use it.
Upvotes: 0
Reputation: 1574
yes this is called AJAX. There are all kinds of AJAX functions in jQuery, in your case I think post would work great. This is the standard example from the jQuery doc:
$.post('ajax/test.php', $('#single-home-container').html(), function(data) {
$('.result').html(data);
});
Take a look here.
Upvotes: 1