Jump to content

Store values of checkboxes


lopes_andre

Recommended Posts

Hi,

 

I'am doing a form with checkboxes that will be edited by the users... the user can create/modify/delete the values of the checkboxes and I have to store that values.

 

I never deal with this type of situation... What is the best option to deal with this? Create a table in the database(mysql) with one column for each checkbox of the form?

 

Best Regards,

André.

Link to comment
https://forums.phpfreaks.com/topic/146845-store-values-of-checkboxes/
Share on other sites

Thanks for your reply.

 

I forgot that I will need to use the values of the checkboxes to construct an SQL query.

 

Wich is the best option? Use values of 1/0 in the checkbox value or use a string in the value of the checkbox? I'am a litle bit confused because I need to store in the database if the checkbox is checked or not checked and I need to construct a query.

 

What should I do?

 

Best Regards,

André.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.