I have a login form on my main website (Site A) that simply collects a username and password.
<form class="" method="post" action="http://ift.tt/1z7msGW">
<h2 class="text-left">Login</h2>
<hr/>
<div class="form-group">
<input type="text" name="email" class="form-control" placeholder="Username/E-mail Address" required/>
</div>
<div class="form-group">
<input type="password" name="pass" class="form-control" placeholder="Password" required/>
</div>
<hr/>
<a href="" class="btn btn-info btn-tiny pull-left">Editor Login</a>
<input type="submit" class="btn btn-primary btn-tiny pull-right" value="Login"/>
</form>
This form submits to my accounting program (Site B). The script looks like this:
public function login()
{
if($this->input->post())
{
$email = $this->input->post('email');
$pass = $this->input->post('pass');
if($this->aauth->login($email, $pass))
{
redirect('/panda');
}
else
{
$this->error('/login');
}
}
else
{
$this->theme->view('auth/login_v');
}
}
When this happens, it looks like the login isn't getting registered because it redirects to the login page of site b and tells me I'm not authorized.
So how would I complete a form on one site and then send the form data to another and register the login session?
Aucun commentaire:
Enregistrer un commentaire