E
E
exedis2015-09-19 20:40:54
PHP
exedis, 2015-09-19 20:40:54

How to send checkboxes to database?

Hello, in general, there is a page in which a table with checkboxes is loaded from the database. So, for example, we checked (or unchecked) some checkboxes, how to update the database after that? That is, we load from the database, change it, and re-upload the already updated version back to the database. How to download these checkboxes?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
eldar_web, 2015-09-19
@eldar_web

With ajax.

A
Alex Safonov, 2015-09-19
@elevenelven

You do not unload checkboxes from the database, there can be both short integer fields and boolean ones. You read data from the database (which may be in different tables and have complex relationships) in order to present them on the html page using the program code.
Let's say you have this data in the form of an html form, which, after editing, you send via a Post request.
The data that came to you through this post-request, you transform with the help of some program logic and update the changed fields with a request to the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question