Olá boa tarde, alguém poderia me ajudar, esse código simplesmente não funciona, os form aparecem se eu estiver logado ou não, e é exatamente o mesmo da aula, seria algum erro fora?
<?php if($this->session->userdata("usuarios_logado")) : ?>
<h1>Login</h1>
<?php
echo form_open("login/autenticar");
echo form_label("Email","email");
echo form_input(array(
"name" => "email",
"id" => "email",
"class" => "form-control",
"maxlength" => "255"
));
echo form_label("Senha", "senha");
echo form_password(array(
"name" => "senha",
"id" => "senha",
"class" => "form-control",
"maxlength" => "255"
));
echo form_button(array(
"class" => "btn btn-primary",
"content" => "Login",
"type" => "submit"
));
echo form_close();
?>
<?php
echo form_open("usuarios/novo");
echo form_label("Nome", "nome");
echo form_input(array(
"name" => "nome",
"id" => "nome",
"class" => "form-control",
"maxlength" => "255"
));
echo form_label("Email", "email");
echo form_input(array(
"name" => "email",
"id" => "email",
"class" => "form-control",
"maxlength" => "255"
));
echo form_label("Senha", "senha");
echo form_password(array(
"name" => "senha",
"id" => "senha",
"class" => "form-control",
"maxlength" => "255"
));
echo form_button(array(
"class" => "btn btn-primary",
"content" => "Cadastrar",
"type" => "submit"
));
echo form_close();
?>
<?php endif ?>