How to display textboxes automatically in PHP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rajkumar.shri
Forum Newbie
Posts: 5
Joined: Mon Sep 15, 2008 1:56 am

How to display textboxes automatically in PHP?

Post 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.......
User avatar
pcoder
Forum Contributor
Posts: 230
Joined: Fri Nov 03, 2006 5:19 am

Re: How to display textboxes automatically in PHP?

Post 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>
 
Post Reply