Page 1 of 1

How to display textboxes automatically in PHP?

Posted: Mon Sep 15, 2008 3:34 am
by rajkumar.shri
Hi..

Pl help me for my query....

I want to display textboxes in another page automatically, by giving value to previous page.

(For eg: if i give value 4 to the textbox then submit. It will open new small window with 4 textboxes with id.)

Please Excuse me for my english is bad.......

Re: How to display textboxes automatically in PHP?

Posted: Mon Sep 15, 2008 4:55 am
by pcoder
It will just give you an idea to sketch your requirement.

Code: Select all

 
<form action="nextPage.php" method="post" target="_blank">
<input type="text" name="loopValue" />
<input type="button" value="submit" onclick="this.form.submit();"/>
</form>
 
nextPage.php

Code: Select all

 
<form action="" method="post">
<?
for($i=0;$i<$_POST['loopValue'];$i++){
?>
<input type="text" name="text" />
<?
}
?>
</form>