Bruce Gust
asked on
How do I echo this?
I've got a loop of select statements that look like this:
<select name="1"></select>
<select name="2"></select>
<select name="3"></select>
<input type="hidden" name="count" value="3">
Then, when I attempt to process the form, I'm doing something like this:
$the_count=$_POST['final_c ount'];
$number=1;
for($x=1; $x<=$the_count; $x++)
{
echo $_POST[$number];
echo "<br>";
$number=$number+1;
}
...it doesn't work. I get an error that says I have an undefined offset.
How can I get this to work?
<select name="1"></select>
<select name="2"></select>
<select name="3"></select>
<input type="hidden" name="count" value="3">
Then, when I attempt to process the form, I'm doing something like this:
$the_count=$_POST['final_c
$number=1;
for($x=1; $x<=$the_count; $x++)
{
echo $_POST[$number];
echo "<br>";
$number=$number+1;
}
...it doesn't work. I get an error that says I have an undefined offset.
How can I get this to work?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER