Problem related to PHP and Javascript
<html>
<script type="text/javascript">
function check()
{
var name=document.form1.uname.value;
if(name=="peeyush")
{
windows.location.href="https://localhost/welcome.php";
}
}
</script>
<body>
<form name="form1">
Username:
<input type="text" name="uname" />
Password:
<input type="password" name="pwd" />
<input type="submit" onClick="check()" />
</form>
</body>
</html>It should redirect on page welcome.php, but the result is the page itself. Can anyone plz help me with this, or if you know any other method to redirect to a PHP page after validation from Javascript.