php - Want to set checkbox's value into database -


i want set checkbox's value database.when checked ,it's value 1 in database .if not checked it,it's value 0.i created in checkbox it's values aren't inserted database. here checkbox

  バナー非表示:<input id="hide_flg" name="hide_flg"  type="checkbox" value="1" <?php if($_post['hide_flg']==1) echo "checked";?>  maxlength="15">     function update_db($param){          $sql = "update table set          image_name = '".$this -> mysql_escape($param['image_name'])."',         url = '',         title = '',         area = '',        hide_flg='".(int)$param['hide_flg']."'        statement;  } 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -