Hello I need to pass an array of client side events to the next page. Here my user would perform a few events which would be stored in a javascript array, upon completion a submit button would be used to post all that data to the next page.

An example of such a process is listed below, could anyone help me returning that array back to php so that I can post it to the next page. I am trying to populate different entries made into textbox into the array arr. And when I would click the submit button, I want to post that array.

<script type='text/javascript'>

function retText(form)
var x = form.txtBox.value;
var arr = new Array();
arr[arr.length]= x;
return arr;

<form name='form' method='post' action=''>
<input type='text' name='txtBox' />
<input type='button' name='click' value='clickme' onclick='retText(this.form)' />
<input type='submit' name='submit' value='submit' />

I want to return that arr back and on post I want to send that array to the next page.

Before I answer on this one, I need to clarify something. Now, you want to enter input into the textbox, click the "clickme" button to set the array, and when you press "submit", you pass the values to the next page?


Are you wanting to enter values into the textbox, one at a time, and when you're done you click on the submit button.

Sorry about my confusion. Working on a chat daemon in php right now, and my head is on sideways. :)