Hi, its me again. I've seen the other code for looping textbox but it goesn't seem to apply in our script. What we need is a specific text box that loops when the user inputs a certain number of textboxes that he want to put.
Example: there's a text box in which the user will enter the number of textboxes that he wanted to display, say 3. So after I click the submit button, there should be 3 textboxes as the output.
iraberyl
0
Newbie Poster
Recommended Answers
Jump to Post<?php if(!isset($_POST['send_hm'] || (isset($_POST['how_many']) && is_int($_POST['how_many'])== false)){ ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>"> <label for="how_many">How many boxes?</label> <input type="text" id="how_many" name="how_many" /> <input type="submit" id="send_hm" name="send_hm" value="Get Boxes!" /> </form> <?php }else{ $num = $_POST['how_many']; ?> <form method="post" action="{some other page}" ...> <p>Whatever your text</p> <?php for($i …
Jump to PostUse the below Specified Code for Looping Textbox:
<form name=textbox method=post> How Many Textboxes you Want to Apper: <input type="text" name="how_many" /><br/> <input type=submit value="Get Text Box" name=submit /> </form> <?PHP if (isset($_POST['submit'])) { $how_many = $_POST['how_many']; echo "<form name=something_here method=post>"; for ($i=0; $i<$how_many; $i++) { echo …
Jump to PostSorry to pick holes hem, but your html is poorly formed - no quotes around your attribute values.
All 12 Replies
muralibobby2015
17
Posting Pro
iraberyl
0
Newbie Poster
diafol
hemgoyal_1990
5
Junior Poster
diafol
iraberyl
0
Newbie Poster
hemgoyal_1990
5
Junior Poster
firdaus Mal
0
Newbie Poster
diafol
Badal_2
15
Newbie Poster
rproffitt
commented:
Try to message those above or start a new discussion.
+15
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
rproffitt
commented:
Nice perk of being a member (or mod or staff!) That said, those in the thread should get an alert soon.
+15
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.