Re: checboxex and sessions
| From: | Yasuo Ohgaki | Date: | Tue, 20 Mar 2001 08:23:08 +0000 |
| Subject: | Re: checboxex and sessions | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-44694@lists.php.net to get a copy of this message | ||
For example, if you have
<from method="post">
Please check here<input type="checkbox" name="checkbox_test" value="User
Checked
Test Checkbox">
</form>
If user does not check the checkbox, you'll get nothing since browser does not
send data at all for the checkbox. However, since you've created the form by
yourself, you know there is the checkbox named "checkbox_test". So you can check
like
if (!isset($HTTP_POST_VARS['checkbox_test'])) {
$HTTP_SESSION_VARS['FORM']['checkbox_text'] = NULL; //NULL requires recent
PHP4
}
Regards,
--
Yasuo Ohgaki
""karakedi"" <eyilmaz76@ultratv.net> wrote in message
news:996qeb$s1a$1@toye.p.sourceforge.net...
> how can i vreate a null/false value for them and how to assing them to
> sessions pls ?
>
>
> ""Yasuo Ohgaki"" <yohgaki@hotmial.com> wrote in message
> news:996p60$fjv$1@toye.p.sourceforge.net...
> > It sounds like you are not getting value from unchecked checkboxes.
> > When checkbox is not checked, no values are sent to server.
> > (Radio buttons are the same)
> >
> > Therefore, you probably cannot register since there is no value for
> register.
> > Create value with NULL/False value for checkboxes if they are not set.
> > Is this the problem?
> >
> > --
> > Yasuo Ohgaki
> >
> > ""karakedi"" <eyilmaz76@ultratv.net> wrote in message
> > news:996hu3$cjn$1@toye.p.sourceforge.net...
> > > how can i store checkbox variables into sessions so that i can use them
> on
> > > other pages ?
> > >
> > > i know how to register sessions but simply cant do that with checkboxes.
> > > thx in adv.
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php-general-help@lists.php.net
> > > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>