title: how to validate a form using a javascript file and redirecting the file to another php page through a php file?
body: <p>I have used script tag under the head tag with the attribute src="formvalidation.js".</p>
  
  <p>In form tag I have used the attributes <code>action="login.php"</code> and <code>onSubmit="return formvalidation();"</code>.</p>
  
  <p>Without performing any validation.the form gets submitted and redirected to login.php.</p>