# How: Javascript send variables to PHP without sitechange

**URL:** <https://forum.kirupa.com/t/how-javascript-send-variables-to-php-without-sitechange/165344>\
**Category:** Uncategorized\
**Created:** [October 10, 2005, 2:48pm UTC](https://forum.kirupa.com/t/how-javascript-send-variables-to-php-without-sitechange/165344 "2005-10-10T14:48:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![McGiver](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@McGiver](https://forum.kirupa.com/u/McGiver)\
**Post date:** [October 10, 2005, 2:48pm UTC](https://forum.kirupa.com/t/how-javascript-send-variables-to-php-without-sitechange/165344/1 "2005-10-10T14:48:12Z")

</div>

Is it possible to send Variables from Javascript in a HTML-file to a PHP file without changing the current page or opening a new Window?

I know there’s a way in flash, but I cannot imagine a way in JS

I.e.:  
A Shop site where you click on an item, Javascript tells a PHP file to add this Item to the User’s Cart, without doing anything to the current site or opening a popup
