Hi!

On Fri, 17 Mar 2006 01:51:41 -0500
John Taylor-Johnston wrote:

> I'm making a tutorial and don't really understand how to do
> this myself :)
> 
> <p>Which of the following pets do have at home:
> <br /><input type="checkbox" name="favourite[]"
> value="dog">dog 
> <br /><input type="checkbox" name="favourite[]"
> value="cat">cat 
> <br /><input type="checkbox" name="favourite[]"
> value="snake">snake 
> <br /><input type="checkbox" name="favourite[]"
> value="other">snake 
> <br /><input type="checkbox" name="favourite[]"
> value="none">none of these 
> </p>

While you're at it, why not use "<input ... />" instead?
(Pls. notice the last forward slash.)

> How do I parse favourite[]? I might have 2 or 5, so I need to
> parse ^0] 
> - nMax. It is a checkbox.

Not exactly sure what you meant but check what's
submitted with:

  $_POST['favourite'] or $_GET['favourite']

> I might use favourite[] with mail() or store it in a mysql
> field.
> 
> If mysql, would I store it in a varchar(20) or an enum() and
> how?

It all depends on how your tables are setup but I don't know
about enum()...

> John

HTH,

- Edwin -

-- 
"Keep doing this in remembrance of me." - Luke 22:19

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to