hi,
how can I print the content of a php variable on screen if the code is inside a function that is called without refreshing the page, but just to store same values in the database ?
thanks
hi,
how can I print the content of a php variable on screen if the code is inside a function that is called without refreshing the page, but just to store same values in the database ?
thanks
AJAX is the only solution. Javascript on the client calls the server, retrieves the value, and updates the necessary DOM object in the displayed page. Beyond doing a form submission (eg POST) or a page retrieval (eg. GET), there's no other way for PHP to affect what goes on in a page once it's been retrieved/displayed.
There are there solutions here: