# Passing multiple checkbox results to PHP in on varible

**URL:** <https://forum.kirupa.com/t/passing-multiple-checkbox-results-to-php-in-on-varible/317538>\
**Category:** flash\
**Created:** [December 23, 2010, 7:37pm UTC](https://forum.kirupa.com/t/passing-multiple-checkbox-results-to-php-in-on-varible/317538 "2010-12-23T19:37:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![damonlee3](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@damonlee3](https://forum.kirupa.com/u/damonlee3)\
**Post date:** [December 23, 2010, 7:37pm UTC](https://forum.kirupa.com/t/passing-multiple-checkbox-results-to-php-in-on-varible/317538/1 "2010-12-23T19:37:33Z")

</div>

Ok, I figured out how to give one variable multiple values dynamically.

But still having trouble getting PHP to recognize all the values in the array.

Giving multiple values to a variable was pretty easy. Just create a empty array and when a checkbox is clicked, populate that array by doing the following:

```auto
var ccbArray:Array = [];

       if(checkBox0.selected)
	{
		//trace("Mozza");
		ccbArray.push(14);
	}
	
	if(checkBox2.selected)
	{
		ccbArray.push(12);
	}
	
	if(checkBox3.selected)
	{
		ccbArray.push(13);
	}

```

The array values are sent in a variable as thus:

variables.myVar = ccbArray;

In ActionScript, when I trace the results of my array I get, for example, 12,13,14. A simple comma-delimited sequence of numbers. Now I just have to pass that to $\_POST[‘myVar’]. PHP can’t handle that without a hack?
