View Full Version : Passing a Javascript variable in a form?

11-09-2004, 03:53 AM
I hope this is the correct forum for this question...

I have an array I've created with javascript that I wish to pass via a form to a php script. I'm using post.

The array is a list of 15 random questions that my user has answered and we'll say it is named answers[]. How do I send this javascript variable to the php script inside my html form?


11-09-2004, 10:32 AM
The submit action sends to the CGI the names/ids and the correspondent values of the form's elements. To pass some javascript varaible's values, you must assign those values to some form's elements (text fields, check boxes, radio buttons, ans so on)