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

[eluser]m628[/eluser]
Hello,
I have a login page:
Quote:localhost/C/userC/Login/2
when they login and the Password is wrong, I have them going to:
Quote:localhost/C/userC/UserNeedsHelp/
I am using the following:
$localU = $User;
$data['error']= "Wrong Password Try Again or <a href='SendPassword/{$localU}'>Email Password</a>";
$this->load->view('UserNeedsHelp',$data);

But the link becomes:
Quote:localhost/C/userC/Login/2/SP/XXXX
I want it to be:
Quote:localhost/C/userC/SP/XXXX

What am i doing wrong?
#2

[eluser]cideveloper[/eluser]
please post your controller. Sometimes when you try to make code generic it is unnecessarily confusing. Questions.

1. Where is your form posting to?
2. If login and the Password is wrong are you redirecting or what?
3. In the url localhost/C/userC/Login/2 what part is the controller and what part is the method?
4. What is SP and XXXX in localhost/C/userC/SP/XXXX?
#3

[eluser]m628[/eluser]
1.Its posting back to itself.
2. I have several checks.Username is valid, password is wrong,User has validated his account via email. Thats the Number after /Login..... an error code
3. userC is the controller, Login is the method and 2 is the afformentioned Error code.
4.SP is a method..send password and XXXXX is thier username (to look up in the method)

Hope this helps. I think I am trying to do things with CI that have to be done a little differently in an MVC paradigm that I need to grasp.Any help is appreciated.

Some background:
/Login shows up
Post back to Login and check the username and Password
if username is correct give them a link to get an email with thier password.
if username is correct and passowrd is correct, but they havent been validated, give them a link to send the validation email
if username is correct and password is wrong, 3 strikes methodology

The Login Controller:

I tried to post my code here and gode an error about spam




Theme © iAndrew 2016 - Forum software by © MyBB