It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming PHP and MySQL Forum

Get value of text box, print out x times

Moderator: Malcolm

Re: Get value of text box, print out x times

Postby rangana on Sat Jan 24, 2009 3:10 am

I suggest you just make the textbox's name: name="inp[]" and the dropdown's name: name="opt[]".

That way, you can take advantage of the name as an array server-side (PHP).

I'm assuming you are POSTing the data.

I would do it like this:
Code: Select all
$inpArr = $_ POST['inp];
$optArr = $_ POST['opt'];

for($i=0;$i<sizeof($inpArr);$i++)
echo $inpArr[i];


Hope that makes sense.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: Get value of text box, print out x times

Postby dflynn on Sat Jan 24, 2009 3:34 am

I think it makes sense I'll try it out. Thanks again.
User avatar
dflynn
500+ Club
 
Posts: 860
Joined: Wed Oct 03, 2007 9:06 pm
Location: Guelph, Canada

Previous

Who is online

Users browsing this forum: No registered users and 1 guest