To post the data, you need a form. To have a form you need a page, so you have to output a page to the browser, containing a form. In the form you put hidden fields with the data you want to send. Then you need to put a javascript in the page, that posts the form. Some users has disabled javascript, if you need to support them also, you would have to put a submit button in the form also, or they would just face a blank page. --- b { font-weight: normal; }