Welcome Guest, Not a member yet? Register   Sign In
Inconsistent $this->input->post()
#2

[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?


Messages In This Thread
Inconsistent $this->input->post() - by El Forum - 07-10-2011, 07:55 PM
Inconsistent $this->input->post() - by El Forum - 07-10-2011, 09:12 PM
Inconsistent $this->input->post() - by El Forum - 07-10-2011, 09:30 PM
Inconsistent $this->input->post() - by El Forum - 07-10-2011, 09:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB