RE: [PHP-DB] 2 problems
| From: | jeffrey_n_Dyke at Keane dot com | Date: | Mon, 08 Sep 2003 12:36:54 +0000 |
| Subject: | RE: [PHP-DB] 2 problems | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-30418@lists.php.net to get a copy of this message | ||
the value will be what ever you set the value to be in your html tag.
<intput type="checkbox" name="color" value="red">
if checked $_POST['color'] will equal "red". if unchecked, the index
'color' will not be in the $_POST array.
hth
Jeff
"Hutchins, Richard"
<Richard.Hutchins@Geti To: php-db@lists.php.net
ngeusa.com> cc:
Subject: RE: [PHP-DB] 2 problems
09/08/2003 08:30 AM
Not really sure of the second part of your question, but, if I remember
correctly, check boxes only appear in the POST vars if they're checked. And
I'm pretty sure their values are ON. So, if you have a color checkbox named
"red" and tha user checks it, it should show up as $_POST['color'] = ON. If
the checkbox is not checked, you won't see it in the POST vars at all.
> -----Original Message-----
> From: Balaji H. Kasal [mailto:balaji@ee.iitb.ac.in]
> Sent: Monday, September 08, 2003 8:24 AM
> To: php-db@lists.php.net
> Subject: [PHP-DB] 2 problems
>
>
>
> Hi,
>
> I am facing 2 problems while using PHP along with form based
> HTML file.
> It takes inputs from the user and updates the DB.
>
> Problems,
> 1) Not able to grab and store the checkbox status.
> 2) Not able to check the correctness of entered interger
> value. I realized
> that form always submits (POST) the value as text.
>
> Thanks in advance!
>
> --
> Regards,
> --Balaji
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php