Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to save and get checkbox value in database php

if ( isset($_POST['check']) ) {
    $check = "some value";
} else { 
    $check = "another value";
}

$sql = "INSERT INTO users (check) VALUES ('$check')";
Comment

PREVIOUS NEXT
Code Example
Php :: laravel passport Route [login] not defined 
Php :: object of class stdclass could not be converted to string php laravel 
Php :: php try json decode 
Php :: close connection pdo 
Php :: php require_once 
Php :: how to run a php file in xampp 
Php :: get shipping price of choosen shipping method woocommerce 
Php :: php while loop 
Php :: wordpress add shortcode with parameters 
Php :: display all files in a directory php 
Php :: wordpress get post date custom format 
Php :: $ is not define in laravel 
Php :: laravel update multiple select query 
Php :: in arrray php 
Php :: get array of last 3 dates with carbon 
Php :: laravel blade array seearch select box 
Php :: firstOrFail() 
Php :: laravel basic login 
Php :: woocommerce my account php code wordpress 
Php :: resize image using intervention laravel and save 
Php :: php lcfirst 
Php :: laravel api 
Php :: change php version on ubuntu 
Php :: laravel collection intersect 
Php :: php mysqli insert name adress 
Php :: A Livewire component was not found 
Php :: append variable into string php 
Php :: php remove non printable characters 
Php :: storefront remove sidebar from product page 
Php :: conditional validation laravel based on role 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =