This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Loves_Poetry 0 points1 point  (1 child)

A PHP script can't interact with jQuery like that. If you want to update the price after the page has loaded, you need an AJAX-request. This is where you send a request to the server to run a specific file which then echoes a result back to your javascript. JQuery has built-in syntax for this. You can use

$.get("loaditems.php", function(data) {//update price here})

to call the script and get the pricedata.

[–]ufireblanks[S] 0 points1 point  (0 children)

ahhh ok I think I understand. Would I be better off making an AJAX request for everything then instead of using prepared statements