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
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]
>
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["
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
Sorry, day late and a dollar short on that one... Never once thought
about using an array, but after seeing John's and Curt's emails on it
(when I realized I was NOT at the top of my emails) I saw how brilliant
a solution that is...
Robert
--
PHP General Mailing List (http://www.php.net/)
To un
Robert Sossomon wrote:
You need to do:
Keeping the name the same makes them a RADIO button and you will only
get the last one.
This is not true. The only thing that will make these a radio button is
setting the 'type' to 'radio'.
The answers put out to this yesterday were correct. Using s
From: "Robert Sossomon" <[EMAIL PROTECTED]>
> You need to do:
>
>
>
> Keeping the name the same makes them a RADIO button and you will only
> get the last one.
This is a valid solution, but it's really just easier to make them into an
array like many others have suggested. Using this method, yo
> Keeping the name the same makes them a RADIO button and you will only
> get the last one.
this is not true
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You need to do:
Keeping the name the same makes them a RADIO button and you will only
get the last one.
Robert
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- John Nichel <[EMAIL PROTECTED]> wrote:
> Like I had a shot in hell of getting the answer in
> first with John and
> Curt trolling the list. ;)
Yep, those two guys are the highrollers here...also
known as the big guns so when they are aroundI
keep my little pistol voice out of it :-)
N
Like I had a shot in hell of getting the answer in first with John and
Curt trolling the list. ;)
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, 2 Aug 2004 15:21:31 -0500, Josh Close <[EMAIL PROTECTED]> wrote:
> Very simple question.
>
> When making multiple checkboxes, you put the name the same for a few
> to group them together
>
>
>
>
>
>
> So they are grouped but then submitting them I only get the last
> value ch
> How would I get all the boxes check when "grouping" them by using the
> same name for all checkboxes in the name field?
there are a number of ways, try:
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Josh Close wrote:
Very simple question.
When making multiple checkboxes, you put the name the same for a few
to group them together
Use a naming convention as such, and they will be sent as an array
(square brackets after the element name)
So they are grouped but then submitting t
* Thus wrote Josh Close:
> Very simple question.
>
> When making multiple checkboxes, you put the name the same for a few
> to group them together
>
>
>
>
>
>
> ...
> How would I get all the boxes check when "grouping" them by using the
> same name for all checkboxes in the name field?
From: "Josh Close" <[EMAIL PROTECTED]>
> Very simple question.
>
> When making multiple checkboxes, you put the name the same for a few
> to group them together
>
>
>
>
>
>
> So they are grouped but then submitting them I only get the last
> value check.
>
>
>
> How would I get a
19 matches
Mail list logo