Textbox auto generate by php and html
Posted
by
user2892997
on Stack Overflow
See other posts from Stack Overflow
or by user2892997
Published on 2013-10-31T03:40:24Z
Indexed on
2013/10/31
3:53 UTC
Read the original article
Hit count: 129
i have few field of data such as product , amount and barcode.The system just show 1 row of data insert form that contain the 3 field.when i completed insert the first row, then second row of textbox will auto generate, i can do it by microsoft access, can i do so for php ?
<?php $i=0; ?>
<form method="post" action="">
<input type="text" name="<?php echo $i; ?>" />
</form>
<?php
if(isset($_POST[$i])){
$i++;
?>
<form method="post" action="">
<input type="text" name="<?php echo $i; ?>" />
</form>
<?php }?>
it work for the first and second textbox, but how can i continue to create more textbox accordingly?
© Stack Overflow or respective owner