urls as $no => $val) {
>
> $txt[$no] = $temptxts[$no];
>
> }
>
>
>
> Now $txt contains only matching text fields.
>
>
>
> Hope this helps,
>
>
>
> Warren Vail
>
>
>
>
>
> > -Original Message-
>
> > From: Rya
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]
[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])){
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]
>
gt; To: [EMAIL PROTECTED]
> Subject: [PHP] Multiple checkboxes and multiple textboxes
>
>
> Hi,
> I have a form that has something like this:
>
> checked> somesite
>
>
> checked> somesite1
>
>
> checked> somesite2
>
>
> As you
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
[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
Hi,
I have a form that has something like this:
somesite
somesite1
somesite2
As you can see from the above, theses a checkbox (url[]) which holds the
value of the URL and a textbox (txt[]) which holds some description text, in
the above there are only 3 rows but actually there are 200 per
8 matches
Mail list logo