[eluser]mayberightguy[/eluser]
I have these lines in config/routes.php:
Code:
$route['default_controller'] = 'pages/view';
$route['(:any)'] = 'pages/view/$1';
In a controller called myController.php I have:
Code:
<?php
class myController extends Controller {
function myFormFunction() {
$test = $this -> _myFormFunction();
}
private function _myFormFunction() {
$this->load->library('form_validation');
if ($this->form_validation->run() == FALSE) {
$this->load->view('myView');
}
else {
$user = $this->input->post('myView');
$this->load->view('myView', "");
}
}
}
?>
And in a view called myView.php I have:
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<?php
//$this->load->helper('form');
echo form_open('myController/myFormFunction');
echo form_input('username', 'johndoe');
echo form_submit('userSubmit', 'Go');
echo form_close();
?>
Some text...
</body>
</html>
I have a bigger problem now, though. I was using WebMatrix as my IDE and I installed a trial of PhpED. Now when I test my php files, only the html before the php is rendered.