For some reason...my PHP code does not like checkboxes.
That code will only set it to false, and not true...no matter the status of the checkbox.
Code:
// Update the site settings
public function settingsAction()
{
$this->validate();
if( $this->_request->isPost() )
{
if( isset($_POST['enable']) )
{
$this->_db->fetchAll( "UPDATE settings SET setting_value='true' WHERE setting_name='site_enabled' LIMIT 1" );
}
else
{
$this->_db->fetchAll( "UPDATE settings SET setting_value='false' WHERE setting_name='site_enabled' LIMIT 1" );
}
}
$this->_redirect('/admin');
}
That code will only set it to false, and not true...no matter the status of the checkbox.
Code:
<sub>Enable Site: <input type="checkbox" name="enable" checked="checked" /></sub>