Jump to content


Photo

using Checkboxes with a database?


  • Please log in to reply
3 replies to this topic

#1 LynneM

LynneM
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 07 January 2004 - 09:27 PM

I have a database setup using MySQL. On my Dreamweaver form I want to use checkboxes, but I must not be binding it correctly. Form in browser shows correctly, but in database the checkboxes are replaced with a textbox and no data saved. I have it listed as a VARCHAR in database...is this incorrect?
Thanks!

#2 cozmic

cozmic
  • New Members
  • Pip
  • Newbie
  • 3 posts
  • LocationMelbourne, Australia

Posted 12 January 2004 - 10:29 PM

I use a TINYINT(1) for checkboxes and the value of the checkbox is 1 when selected.

#3 LynneM

LynneM
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 13 January 2004 - 12:21 PM

Thanks! I'll try that...

#4 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 26 February 2004 - 11:39 PM

Also you could use enum and set defaults to ('0','1'). Works a treat 4 me.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users