[PHP] Multiple checkboxes and multiple textboxes

2004-11-05 Thread Ryan A
Hi, I have a form that has something like this: input type=checkbox name=url[] value='http://somesite' checked a href='http://somesite' target=asomesite/a brinput type=text name=txt[] size=75 value='some desc' input type=checkbox name=url[] value='http://somesite1' checked a

RE: [PHP] Multiple checkboxes and multiple textboxes

2004-11-05 Thread Jay Blanchard
[snip] These values will be entered into the database so I need proper matching pairs of URL and TXT [/snip] for($i = 0; $i count($url); $i++){ if(( != $url[$i]) ( != $txt[$i])){ //it is OK to put into database } else { //it ain't OK } } -- PHP General Mailing List

Re: [PHP] Multiple checkboxes and multiple textboxes

2004-11-05 Thread Brent Baisley
You're close, but you want to use multidimensional arrays. So something like: input type=checkbox name=data[0][url] value='http' input type=text name=data[0][txt] size=75 value='desc' input type=checkbox name=data[1][url] value='http' input type=text name=data[1][txt] size=75 value='desc' input

RE: [PHP] Multiple checkboxes and multiple textboxes

2004-11-05 Thread Vail, Warren
-Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Friday, November 05, 2004 11:28 AM To: [EMAIL PROTECTED] Subject: [PHP] Multiple checkboxes and multiple textboxes Hi, I have a form that has something like this: input type=checkbox name=url[] value='http

RE: [PHP] Multiple checkboxes and multiple textboxes

2004-11-05 Thread Ryan A
Nope, This didnt work, it just chops off the last x depending on how many were selected. Thanks, Ryan On 11/5/2004 8:46:27 PM, Jay Blanchard ([EMAIL PROTECTED]) wrote: [snip] These values will be entered into the database so I need proper matching pairs of URL and TXT [/snip] for($i

RE: [PHP] Multiple checkboxes and multiple textboxes

2004-11-05 Thread Jay Blanchard
[snip] This didnt work, it just chops off the last x depending on how many were selected. [/snip] Hmreally? I was just able to do this with nary a problem. Chops off? Can you just echo out the results? for($i = 0; $i count($url); $i++){ if(( != $url[$i]) ( != $txt[$i])){

RE: [PHP] Multiple checkboxes and multiple textboxes

2004-11-05 Thread Ryan A
Hi Jay, I modified your code slightly because I am working with 152 rows and the output would be a _lot_ This is how i modified it: $url=$_POST['url']; $txt=$_POST['txt']; for($i = 0; $i count($txt); $i++){ if(( != $url[$i]) ( != $txt[$i])){ //echo $url[$i] . nbsp;. $txt[$i] .

RE: [PHP] Multiple checkboxes and multiple textboxes [SOLVED]

2004-11-05 Thread Ryan A
:28 AM To: [EMAIL PROTECTED] Subject: [PHP] Multiple checkboxes and multiple textboxes Hi, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php