dlysuc
02-25-2007, 07:07 PM
Can someone help me with the processing of a submitted form. The form is generated with a while loop and I am using another while loop to process it, so to retrieve each group of fields I just add a number to a variable and use the variable.
Here is an example similar of what I have that demonstates the field not being retrieved as expected:
<?
if (isset($_POST['submit'])) {
$rcount = 1;
$Check = 'P'.$rcount;
echo'Submitted String '.$Check.' = '.$_POST['$Check'];
}
$rcount = 1;
?>
<br>
<form action="<? echo $_SERVER['PHP_SELF']?>" method="post">
<input type="text" name="P<? echo$rcount; ?>" size="2" maxlength="2">
<input type="submit" name="submit" value="Submit">
</form>
Can someone point me in the right direction where I am going wrong? Thanks.
Here is an example similar of what I have that demonstates the field not being retrieved as expected:
<?
if (isset($_POST['submit'])) {
$rcount = 1;
$Check = 'P'.$rcount;
echo'Submitted String '.$Check.' = '.$_POST['$Check'];
}
$rcount = 1;
?>
<br>
<form action="<? echo $_SERVER['PHP_SELF']?>" method="post">
<input type="text" name="P<? echo$rcount; ?>" size="2" maxlength="2">
<input type="submit" name="submit" value="Submit">
</form>
Can someone point me in the right direction where I am going wrong? Thanks.