[eluser]dioramayuanito[/eluser]
Code:
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Test extends CI_Controller {
function __construct() {
parent::__construct();
}
function index() {
?>
<html><head><title>Test</title></head>
<body><form action="/index.php?fa=test&m=post" method="post">
<input type="text" name="thisis">
<input type="submit" name="Submit" value="submit">
</form></body>
</html>
<?php
}
function post() {
//first if
if ($this->input->post('thisis')) {
echo("ok1\r\n");
}
//second if
$thisis = $this->input->post('thisis');
if ($thisis) {
echo("ok2\r\n");
}
echo("end\r\n");
}
}
"first if" and "second if" run exactly the same. Am i missing somethin?