How do I pass a value from JavaScript to PHP without needing to reload page, as with

H M M M

New member
cookies? Recently I was trying to pass a value from Javascript to PHP.

On Yahoo Answers, I was advised to try the 'post' method. I was unsure how to do that, so I used a cookie instead.

It works, but the cookie only appears once a new page is loaded (or the same page is reloaded). That is not good, as I have the Java and PHP in the same file, and so the PHP can't see the value unitl a new page loads, but it needs to even without a page load.

If I use the post method, or some OTHER method, can the PHP share values on the same page with the JavaScript, without needing to reload a new page for the PHP to be able to 'see'; the value, as is the case when using a cookie?
 
Back
Top