<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Asiahome Trading Corporation (Server)</title>
<script language="javascript" type="text/javascript">
function validate(){
var user = document.getElementById('username')
var pass = document.getElementById('password')
user.style.backgroundColor = (user.value.length == 0) ? "red" : "";
pass.style.backgroundColor = (pass.value.length == 0) ? "red" : "";
if(user.value.length == 0 || pass.value.length == 0){
if (user.value.length == 0){
user.focus();
return false;
}
else if (pass.value.length == 0){
pass.focus();
return false;
}
}
else if (user.value.length != 0 || pass.value.length != 0){
document.forms["frmLogin"].submit();
}
}
</script>
</head>
<body>
<form id="frmLogin" method="post" action="sample.php">
<table width="254" border="0">
<tr>
<td width="100"></td>
<td width="144"><input type="text" name="username" id="username" /><input type="password" name="password" id="password"/></td>
</tr>
<tr>
<td></td>
<td><input type="button" value="Login" onclick="validate()"/><input type="reset" value="Cancel" /></td>
</tr>
</table>
</form>
</body>
</html>
this one is working, all i want happen is
how can i receive and post the value of username and password to another page(sample.php)
friendsssss plssss!!!!!!!!!!!!!!!!!!!!