In a simple application. A value is passed to view. However codeigniter reports an error:
PHP Code:
class User extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->helper('url');
$this->load->model('user_model');
$this->load->library('session');
}
public function index()
{
}
public function alterarUsuario(){
$teste ="2";
$this->load->view('teste.php', $teste);
}
}
?>
View Code:
<?php
$teste = $_REQUEST['teste'];
echo "Resposta: ".$id;
?>
Error Message: