Hi there:
Not sure this'll work but it's some way towards it I would think:
(Note all occurances of the variable: '$display_this'
//Start off the display item outside the loop
$display_this = "<form>";
if ($art_nr1 != '') {
$i++;
$display_this .= "
<td>
<input type=\"hidden\" name=\"art_nr_$1\" value=\"$art_nr1\">
<input type=\"text\" name=\"quant$i\" size=\"3\" maxlength=\"5\">
</td>
";
I've now got the following
art_nr_1=12456
quant1="" or 1 or so
And now comes the bit which doesn't work !
for ($i=1; $i<50; $i++) :
$varid = "quant".$i ;
if ($$varid != "") {
//Continue 'building up the varuable:
$display_this .=
"<input type=hidden name=\"art_nr\" value=\"$art_nr_$i\">
<input type=hidden name=\"quantity\" value=\"$quant$i\"> ";
}
endfor;
//Echo thwe variable to the page
<?php echo"$display_this"; ?>
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
http://gertrude.sipu.anglia.ac.uk/webteam
[EMAIL PROTECTED]
+44 (0)1223 363271 ext 2331
www.theruss.com
#-------------------------------------------------------#
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]