Hi all,
I have a problem parsing the dynamic content of a form over.
What I am trying to achieve is this:
First I create an HTML form based on the fields in a table:
<? do { ;?>
<? for ($i = 1; $i < $cols; $i++){ ;?>
<tr>
<td width="26%"> <? echo $myfields[$i] ;?></td>
<td width="74%"><div align="center">
<input type='text' name='<? echo $myfields[$i]; ?>'>
</div></td>
<? } ;?>
</tr>
<? } while ($myrow = mysql_fetch_array($results)); ?>
<? };?>
This generates the form dynamically. Then I parse these results to a script:
foreach ( $HTTP_POST_VARS as $key=>$value ) {
$upd = "$key = $value";
echo"".$upd."";
}
For the moment I am just looking for what is parsed. From what is parsed I will build and INSERT statement but my problem is this.
When I look at what is being parsed I notice that submit=submit is also parsed over with the other name pairs like this:
firstname = q lastname = q emailaddress = q list_name = q joindate = q receipt = q activate = q passwd = q bopb = q Submit = Submit.
Is there anyway to strip the submit=submit of the end? I don't want it to appear in the INSERT statement or it will throw an error.
Any help would be greatly appreciated