I want to make a nice login system.
Here is what i had in mind:
i have a html form - with 2 text inputs (user &pass) and one submit button. I want when the user clicks the button to be directly logged in, if not an error message to appear that the user pass where incorrect - all in the same little box.

I think i need JS...
<input type="submit" value="Login" onclick="PHP_FUNCTION_HERE !?!?">
How can i code this - please give me an example....

thanks in advance,