我想做个网页,输入账号和密码然后按下登陆按钮,在数据库中查找匹配項,应该怎么相互调用PHP和JS呢
本人完全没有PHP和数据库编程的经验,请各位大神详细解答。代码如下,谢谢
<input name="button" type="submit" id="button" onclick="call_php('textfield.getAttribute('value')', 'textfield2.getAttribute('value')')" value="提交" />function login($user_name, $user_password)
{
do
{
if($row_rs_loginUI['user_name'] == $user_name && 
   $row_rs_loginUI['user_pwd'] == $user_password)
{
return true;
}
}
while($row_rs_loginUI = mysql_fetch_assoc($rs_loginUI));
return false;
}
<script type="text/javascript">
function call_php(user_name, user_password) { //v1.0
  if("<?php login(user_name, user_password);?>" == true)
  {
  alert("sucessed");
  }
}
</script>PHPJavaScript数据库