ComputerForum.com ComputerForum.com  
TigerDirect
 
Go Back   Computer Forum > Computer Software > General Software

Reply
 
LinkBack Thread Tools Display Modes
Old 07-04-2007, 10:40 PM   #1 (permalink)
Diamond Member
 
Join Date: May 2005
Location: here
Age: 22
Posts: 1,017
Default CheckBox question with php

Hello all,
I am building an application (web),and I am designing a form,using HTML,
I'd checkboxes , I am using isset to enter the data into the database, how can I know if the user has checked or not the checkbox (using checked property), how would I enter that into database?>
I am using the type of that field as binary?
is that correct
Thanks in advance
__________________
TechNoloGy ConTrols tHe World
AnD I conTroL the TecHnOl0gy
Gue$s WhO @m i.
HehEhehee :confused:
houssam_ballout is offline   Reply With Quote


Old 07-05-2007, 12:51 AM   #2 (permalink)
Moderator
 
Cromewell's Avatar
 
Join Date: Dec 2004
Location: Canada
Age: 25
Posts: 10,117
Default

Only checkboxes that have been checked are passed though.
Code:
<input type="checkbox" name="example" value="opt1" /><br />
<input type="checkbox" name="example" value="opt2" />
If both boxes were checked example=opt1 & example=opt2 would be passed so keep in mind if you are using checkbox groupings you may have multiple values for the same control name. If only opt1 was checked only example=opt1 would be passed.

Storing the checked/not checked in a binary (boolean) field is a good way.
__________________

You know what the chain of command is? It's the chain I go get and beat you with 'til ya understand who's in ruttin' command here.

I must plug a couple comics because they are good :D:
www.ctrlaltdel-online.com
www.userfriendly.org
Cromewell is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP isset question houssam_ballout General Software 1 06-14-2007 03:51 AM
php question houssam_ballout General Software 1 04-13-2007 08:43 PM
php question 2 houssam_ballout General Software 0 09-12-2006 05:19 PM
Server running Apache 2.2.2 - Setting Up PHP jbrown456 General Computer Chat 3 08-21-2006 11:23 PM
PHP under "Microsoft FTP Service (version 5.0)" ?? DARKGuy General Software 0 01-19-2006 09:29 PM



All times are GMT +1. The time now is 06:10 AM.


Powered by: vBulletin Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Copyright © 2002-2007 Computer Forum and Web Design Forum