Ok, so this question is kind of hard to word, but i'll try my best. So I currently have an index.php page with a pop-up login form and I have login.php with all the login php stuff to deal with the request. At the moment I can only seem to print login errors on the login.php page, which opens up a blank white page with just the errors on that, due to the fact that the form action on my index.php form is set to "login.php" which deals with the login stuff.. What I want is to print the erros on the login form in my index.php, but have the login.php deal with the rest of the php. I hope that kind of makes sense.
<form action="login.php" method="post">
<input type="text" name="email"/>
<input type="password" name="password"/>
<input id="remember" type="checkbox" />
<label for="remember">Keep me signed in</label>
<div class="one_half last"><input type="submit" class="btn btn-blue" value="Login"></div>
<div class="one_half last"><a href="#" id="register_form" class="btn">Sign up</a></div>
Above is the code for my form on the index.php page. the commented out php in that is where I want to print the errors.
Below is my login.php