php checkbox

how to store php checkbox value in mysql database

Page 1 of 1

2 Replies - 3498 Views - Last Post: 18 October 2009 - 03:55 PM Rate Topic: -----

#1 sjith  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 18-October 09

php checkbox

Posted 18 October 2009 - 03:37 PM

hello there :), i want to know how to store a checkbox value (for a field ) in php with mysql..am using xampp..


am checking a field with various check boxes in that, the selected checkbox values should stor in mysql.. how to do this??

i don,t know the proper syntax to store a checkbox value
i have tried the following...

Attached File(s)

  • Attached File  tep.txt (1.18K)
    Number of downloads: 232
  • Attached File  tes.txt (925bytes)
    Number of downloads: 170


Is This A Good Question/Topic? 0
  • +

Replies To: php checkbox

#2 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 3717
  • View blog
  • Posts: 13,491
  • Joined: 08-August 08

Re: php checkbox

Posted 18 October 2009 - 03:53 PM

See this tutorial link:

http://www.dreaminco...wtopic86370.htm

Then just store a value in the table to indicate whether a box has been selected or not.
Was This Post Helpful? 0
  • +
  • -

#3 tommyflint  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 34
  • View blog
  • Posts: 679
  • Joined: 24-July 08

Re: php checkbox

Posted 18 October 2009 - 03:55 PM

Checkbox's are either true or false, 1 or 0 (boolean) so just store it depending if it is a 1 or 0

tommyflint

This post has been edited by tommyflint: 18 October 2009 - 04:03 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1