I'm using a check box form. Users can select more than one selection from a group. The form below is an example of what I am using. I want to save the array that is created with this using session_register().
I use this with just saving one variable. How would I change this to save the array that is create when more than one selection is made.
session_register('fruit');
$_SESSION['fruit'] = $fruit;
<form method="POST" action="http://mysite.com/page.php">
<p><input type="checkbox" name="fruit[]" value="apples">APPLES
<input type="checkbox" name="fruit[]" value="oranges">ORANGES</p>
<p><input type="checkbox" name="fruit[]" value="pears">PEARS
<input type="checkbox" name="fruit[]" value="peaches">PEACHES</p>
<p><input type="submit" value="Submit" name="submit"><input type="reset" value="Reset" name="reset"></p>
</form>