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

2004-11-05 Thread Ryan A
Hey guys, Thank you everyone who replied. The below solution from Warren worked out great for me with a little modification for my specific needs. Cheers, Ryan > Hard code the array occurrence number in the checkbox and textbox names; > checked> somesite > > The form will only return the chec

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] . " ". $txt[$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
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] >

RE: [PHP] Multiple checkboxes and multiple textboxes

2004-11-05 Thread Vail, Warren
Hard code the array occurrence number in the checkbox and textbox names; somesite The form will only return the checkboxes that are checked and the textboxes will return all textboxes (that is the nature of these input controls with most browsers); $urls = $_POST["url"]; $temptexts = $_POST["

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: ... Obviously you can put that into a loop to generate how many you want instead of typing each one individually. It will then be simple to match your array items since your array will have x rows and two colu

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 Maili