mysql_num_rows is a function, and should be called with resource parameter, in your case mysql_num_rows($query). There may be more bugs, but this one was standing out
There is also a security bug with not escaping $_POST data used in MySQL query, which can lead to XSS.
In your HTML, you have two "password" inputs with the same name (wrong!), and there is name="E-mail id" input, while in PHP you refer to $_POST ['email'], not "E-mail id".
Frankly, you should get back to school and learn basics, you code is something utterly horrible..