I have a form that gets repeated depending on number of members in a
group(1 form surrounds all members). I separate the entries by assigning
a count value to the names of the inputs (Ex. input type=text
name=address$count value=). Does anyone know how I can pull the values
back out of the
for ($i=0;$i$_POST[count];$i++)
{
echo $_POST['address' . $i] . 'br';
}
Concanate array key 'address' with $i
--
Julio Nobrega.
Um dia eu chego lá:
http://sourceforge.net/projects/toca
Ajudei? Salvei? Que tal um presentinho?
On Tuesday, March 26, 2002, at 01:18 PM, Jeff Hatcher wrote:
I have a form that gets repeated depending on number of members in a
group(1 form surrounds all members). I separate the entries by assigning
a count value to the names of the inputs (Ex. input type=text
name=address$count
and do something like this.
foreach($address AS $k = $v)
{
echo $k : $v;
}
Jim Lucas
www.bend.com
- Original Message -
From: Jeff Hatcher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 10:18 AM
Subject: [PHP] Array in a Loop Question
I have a form that gets
, 2002 10:18 AM
Subject: [PHP] Array in a Loop Question
I have a form that gets repeated depending on number of members in a
group(1 form surrounds all members). I separate the entries by assigning
a count value to the names of the inputs (Ex. input type=text
name=address$count value=). Does
for ($i=0;$i$_POST[count];$i++)
{
echo $_POST['address' . $i] . 'br';
}
Concanate array key 'address' with $i
This works fine and I also can do the address[] but my ultimate result
is to put this in the database.
So address='$_POST['address' . $i]' fails and
address='$_POST[address][$i]'
On Tuesday, March 26, 2002, at 02:12 PM, Jeff Hatcher wrote:
So my question is how can I put this in the database without having to
reassign my variable name?
You have to jump out of the quoted string that represents your SQL
query when you echo the value of the $_POST variable. Like
7 matches
Mail list logo