0

I have a form (login), I want to call a method on my controller, when clicking the button "Sign in" method is not executed and returns to the main screen with the data entered.

My view (login.php)

                <?php echo form_open('home/loginv'); ?>
                <div class="form-group  m-b-20" >
                    <input name="usuario" type="text" class="form-control input-lg" placeholder="Name" data-required="true" value="<?php echo set_value('usuario') ?>" ></input>
                    <?php echo form_error('usuario'); ?>
                </div>
                <div class="form-group  m-b-20">
                    <input name="password" type="password" class="form-control input-lg" placeholder="Password" value="<?php echo set_value('password') ?>" ></input>
                    <?php echo form_error('password'); ?>
                </div>

                <div class="login-buttons">
                    <button type="submit" class="btn btn-danger btn-block btn-lg">Log in</button>
                </div>
                <?php echo form_close(); ?>

My controller, loginv method (Home.php)

public function loginv() {

    if ($this->form_validation->run('login') == FALSE) {
        $this->load->view('home/login');
    } else {
        $resultado = ...
        if ($resultado != null) {
            ...
            redirect('home/dashboard');
        } else {
            ...
            redirect('home/login');
        }
    }
}

My web.config

<system.webServer>

    <httpErrors errorMode="Detailed" />
    <asp scriptErrorSentToBrowser="true"/>

    <rewrite>
    <rules>
        <rule name="MyRule">
            <match url="^(.*)$" /> 
            <conditions> 
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
            </conditions> 
            <action type="Rewrite" url="index.php/{R:1}" appendQueryString="false" />
        </rule>
    </rules>
    </rewrite>

</system.webServer>

<system.web>
    <customErrors mode="Off"/>
    <compilation debug="true"/>
</system.web>

My config.php

...
$config['base_url'] = 'http://192.168.0.105/myAplicattion';
...
$config['index_page'] = '';
...

I am using Codeigniter and my server is IIS.

Thanks!

Gutenberg
  • 992
  • 1
  • 7
  • 17
  • Maybe this could help. [http://stackoverflow.com/questions/5408111/codeigniter-2-on-iis-with-web-config-file](http://stackoverflow.com/questions/5408111/codeigniter-2-on-iis-with-web-config-file) – heliosk May 29 '15 at 19:20
  • Thanks @heliosk , but it did not work me. – Gutenberg May 29 '15 at 20:13

0 Answers0