[eluser]Pygon[/eluser]
As webthink said -- print_r doesn't work for boolean values.
However -- $this->input->post() can *not* be used to test whether $_POST has been initialized.
post() without using a key name will always return FALSE regardless of anything:
Code:
function post($index = '', $xss_clean = FALSE)
{
if ( ! isset($_POST[$index]))
{
return FALSE;
}
//....
$this->input->post('genre') will return the value, or FALSE if it is not set.
Personally, I'm of the opinion that $this->input->post() should return TRUE if not empty, FALSE if empty(or not set), the VALUE when supplied a key, or FALSE if the key is not set.
Which would allow:
Code:
if( $this->input->post() )
{
//Process form
}
else
{
//show form
}