Hi all.
I've been doing a bit of searching, but haven't quite found the answers I'm looking for. I'm pretty new to PHP, learning from example so far.
So basically I might not understand some of the basics, so please bear with me. :-)
Basically I'm trying to make a dynamic HTML form that can be anywhere between 1 and 10 lines long. Each line will have a box for allowing users to input a 1-4 digit number, followed by two radio bottoms. The radio buttons need the same name so that it's a one or the other type selection. The first radio button needs a value of 1 and the second a value of 2.
Once someone submits the form, I need to process the submitted data, but I'm having problems figuring out how to pass the data into the next function. I think I need to put all of the information into an array, but I don't really know how to do that.
Here's what I have so far.
$color = $color_line1;
$i = ($link_max - $i);
while($i > 0)
{
echo " <tr>\n";
echo " <td align='center' bgcolor='$color'><input maxLength='6' size='6' name='makesec'></td>\n";
echo " <td align='center' bgcolor='$color'><input type='radio' value='1' name='make$i[num]'></td>\n";
echo " <td align='center' bgcolor='$color'><input type='radio' value='2' name='make$i[num]'></td>\n";
echo " </tr>\n";
$i = $i - 1;
if($color == $color_line1)
{
$color = $color_line2;
} else {
$color = $color_line1;
}
}[quote]...[/quote]if ($command == "create")
{ $count = count($make);
for($i=0; $i<$count; $i++)
{
echo "Create option $i\n";
echo "<br>\n";
echo $make[sec];
echo $make[num];
}
}[/quote]
I realize what I have doesn't work and it might look kinda dumb, but like I said, I'm trying to teach myself PHP through example. :-)
I'm also attaching a zipped copy of the file. I added variable to the top since I have most variables defined in a config.php file which I am not including. Sorry if I forgot to list a variable.
Any guidance you guys could provide would be GREATLY appreciated.