ganjaboss;11037409 wrote:I tried to use include command.. For importing the POST
No idea what you mean there... can you elaborate?
The only thing your include statement is going to do is display the login form again after it has been submitted (since that's all that index.php appears to do).
ganjaboss;11037409 wrote:but it doesn't work if it's there, and neither if it isn't there..
What do you mean? How do you know "it" doesn't work? What are you seeing and what did you expect to see?
In the code you posted above, assuming there are no errors connecting to the MySQL server and selecting the database, the only thing you should expect to see is the login form displayed again with no error messages.
Speaking of connecting to MySQL... Stop Using the MySQL Extension!
EDIT: Missed the attachment link the first time around (probably because it would have been easier to just post the errors). Since you never check to see if the external variables exist before you attempted to use them, I would expect to see those errors if you visited the login.php directly.
If you're trying to submit the form and getting those messages, you might try using [man]var_dump/man or [man]print_r/man on $_POST to see what it contains.
EDIT2: Is "<from" a typo in your original post or is that actually in the HTML document?