Welcome Guest, Not a member yet? Register   Sign In
url wierdness
#1

[eluser]joeizang[/eluser]
hey guys,

I have a funny thing that happens to my local setup for development. I have a form with action like so:

Code:
<div class="entry">
              <p>
                  &lt;form action="students/loginstudent" method="POST" id="studentlogin"&gt;
                  <p><label for="Username"><strong>Username :</strong>&lt;input name="user_name" id="uname" type="text"/&gt;&lt;/label></p>
                  <p><label for="Password"><strong>Password :</strong>&lt;input name="password" id="password" type="password"/&gt;&lt;/label></p>
                  <p>&lt;input name="submitbtn" id="logbtn" type="submit" value="Login"/&gt;&lt;/p>
                  &lt;/form&gt;
           </p>
     &lt;?php
            echo '<p class="errors"><strong>'.$this->ion_auth->errors().'</strong></p>';
            echo '<p class="errors"><strong>'.validation_errors().'</strong></p>';
                    
     ?&gt;

and I have a function in my students controller called loginstudent. Now when I try to login I am brought back to the login form again but the url says this:

Code:
http://localhost:8888/schoolmanager/index.php/students/students/loginstudent

so my question is has anyone encountered this before? I thought of sharing this here first as I think this is the best place to start finding answers.

Thanks for all the help!!!

:question:Smile
#2

[eluser]CroNiX[/eluser]
if you aren't going to use the form helper for creating your form elements, you should include the full path for your form action and not use a relative path.
#3

[eluser]joeizang[/eluser]
thanx cronix,

now I don't have to bog anyone about this.




Theme © iAndrew 2016 - Forum software by © MyBB