Let's say you've got a form with check boxes like below:

<form method="post" action="path to script">
<input type="textbox" id="text[]" value="" /> ***
<input type="textbox" id="text[]" value="" /> ***
<input type="textbox" id="text[]" value="" /> ****
<input type="textbox" id="text[]" value="" /> ****
</form>

I don't understand what you mean? Can you try and explain it better

I will recode your code
I assume this is text box not like on your title that is checkbox
I hope it will be a help to you

<html>
<body>
<form action="<?php htmlspecialchars($_SERVER['PHP_SELF']);?>" method="POST">
<?php
for($i=0,$i<5,$i++){
//this will out put text boxes with the loop of 5... and will be used further in looping the array
echo "<input type='text' name='text[]'><br/>";
}
?>
<input type="submit" value="GO">
</form>
</body>
<html>
<?php
// here goes the $_SERVER['PHP_SELF']
// count the array
$number=0;
//use for each to retrieve the values of an array per loop
foreach($_POST['text'] as $arrayCount){
echo $number+1.".)".$arrayCount;
}
?>

hi.. bradly.spicer you not unserstand that question or code..
sorry i'm changed the code before post the perivous code is here

<form method="post" action="path to script">
<input type="checkbox" id="colors[]" value="red" /> Red
<input type="checkbox" id="colors[]" value="blue" /> Blue
<input type="checkbox" id="colors[]" value="green" /> Green
<input type="checkbox" id="colors[]" value="yellow" /> Yellow
</form>
Member Avatar for diafol

How do you want the data stored? As a serialised list, discrete fields?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.