获取form表单由submit提交的内容

  1. html中的form表单部分的代码
<form action="dbController.php" id="loginform" method="post">
    <p><input type="text" class="num" placeholder="编号" title="编号" maxlength="4" value="" name="num" id="num"/>p>
    <p><input type="password" class="pwd" placeholder="密码" name="pass" id="pwd" title="pwd"/>p>
form>

2.dbController.php部分的代码

<html>
<head>
    <title>title>
    <meta charset="utf-8">
head>
<body>
    <p>编号p> echo $_POST["num"]; ?>
    <p>密码p> echo $_POST["pass"]; ?>
body>
html>

你可能感兴趣的:(前端)