Jump to content


Dynamic check boxes

  • Please log in to reply
3 replies to this topic

#1 robertvideo

  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 26 January 2004 - 07:32 PM

I've set up tables in a mysql database

I have a field called foodtype which is a varchar 12

I want to have 3 choice check boxes that write to the database into the foodtype field

cb 1 - itailain
cb 2 - greek
cb 2 - spanish

I though I set it up.. but it's not writing to the DB
I can write ALL the other table field but not this one called foodtype

what should the set up be
and what type of field should it be in MYSQL
right now I have it as varchar unless you could suggest otherwise

I'm using DW MX 2004 on Mac OSX 10.2.3

thanks in advance

PS: if this helps here is a sample I'd seen online
Posted Image

#2 morpheus.100

  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 02 February 2004 - 04:52 PM

If using checkboxes why try to register info into a field "varchar". Using a checkbox wont allow you to enter anything of variable charachter, only a value to asscertain whether or not it is checked. Go to SQLfreaks site using the links and read up on some tutorials about databases. I could sit here and type all day.

#3 morpheus.100

  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 26 February 2004 - 11:46 PM

Worked it out yet? Set field to enum and use a default ('0','1')

#4 Dreamer

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 04 March 2004 - 05:03 PM

Yeah, did u sort it out?
i'm having a similar problem; how can i pass the details of a radio button to a database; so for e.g i a have a database with a queston and two possible choices 'yes' and 'no', if the user clicks either i want to record teh number of clicks for each choice
please jelp

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users