Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 13th, 2006, 05:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default posting an array from checkboxes

Can somebody tell me why this works, I have a form with checkboxes and when I send the checked values in a form to a completely different page they read without using a
$_POST['checkbx_test']

Page 1.
<form action="testform.php" method="post" name="GroupB">
<input type="checkbox" name="checkbx_test[]" value="1" />1<br />
<input type="checkbox" name="checkbx_test[]" value="2" />2<br />
<input type="checkbox" name="checkbx_test[]" value="3" />3<br />
<input type="checkbox" name="checkbx_test[]" value="4" />4<br />
<input type="checkbox" name="checkbx_test[]" value="5" />5<br />
<input type="submit" value="Submit" />
</form>


Page 2.
while (list ($key,$val) = @each ($checkbx_test)) {
    echo $val . "<BR>";
}

Thank You
MIke
__________________
Peace
Mike
http://www.eclecticpixel.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convering a String Array to an Integer array nkrust C# 9 November 17th, 2010 12:02 PM
Go from 2d Array to 1d array without defining type OneQuestion General .NET 1 January 10th, 2008 11:13 AM
Posting String Array From one page to another page Samatha ASP.NET 1.0 and 1.1 Professional 1 December 6th, 2006 03:54 AM
error when sorting an Array of Array nancy VBScript 2 February 17th, 2005 12:57 PM
Passing php array values to javascript array gkrishna Pro PHP 0 November 6th, 2004 03:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.