+ 6
How to get data using CheckBox in PHP?
3 odpowiedzi
+ 5
Create an Array $languages_arr to store languages names. Using this to create checkboxes by looping on it. On <form> submit convert $_POST['lang'] to string using implode() . Check entry in languages table if not exists then insert $lang in the table otherwise update language value.
https://makitweb.com/get-checked-checkboxes-value-with-php/#:~:text=Create%20an%20Array%20%24languages_arr%20to,checkboxes%20by%20looping%20on%20it.&text=On%20submit%20convert%20%24_,table%20otherwise%20update%20language%20value.
+ 6
Παναγιώτης Μανταφούνης Thanks
0
you can create a table in your existing database. For example, table named ‘cars’ that consists of four fields: — id,company_name, brand_name, and car_name.
DDL information of the table
— — — — — — — — — — — — — — — — — —
CREATE TABLE `cars` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `company_name` varchar(225) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `brand_name` varchar(225) COLLATE utf8mb4_unicode_ci DEFAULT NULL,`car_name` varchar(225) COLLATE utf8mb4_unicode_ci DEFAULT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_unicode_ci
https://onlinewebtutorblog.com/