error when unchecked
Notice: Undefined index: is_popup in admin/model/design/popupbanner.php on line 48Notice: Undefined index: is_popup in admin/controller/extension/module/popupbanner.php on line 44Warning: Cannot modify header information - headers already sent by (output started at admin/controller/startup/error.php:34) in system/library/response.php on line 12
admin/model/design/popupbanner.php
Code: Select all
$sql = "update `".DB_PREFIX."popupbanner_setting` set
`title` = '".$this->db->escape($all_post["title"])."',
`desc` = '".$this->db->escape($all_post["desc"])."',
`weblink` = '".$this->db->escape($all_post["weblink"])."',
`bannerfile` = '".$this->db->escape($all_post["bannerfile"])."',
`is_popup` = '".$this->db->escape($all_post["is_popup"] == "Y" ? "Y" : "N")."'
where `id` = '".$this->module_setting_id."'";
$rs = $this->db->query($sql);
}
Code: Select all
if($this_request_post["is_popup"] == ""){
$this_request_post["is_popup"] = "N";
}
Code: Select all
<input type="checkbox" name="is_popup" value="Y" <?=($is_popup == "Y" ? "checked" : "")?> />
string(188) "update `popupbanner_setting` set `title` = 'Test', `desc` = '', `weblink` = '', `bannerfile` = '', `is_popup` = 'Y' where `id` = '1'"
string(188) "update `popupbanner_setting` set `title` = 'Test', `desc` = '', `weblink` = '', `bannerfile` = '', `is_popup` = 'N' where `id` = '1'"