我试图从我的HTML表单中获取数据并将其存储在数据库中。但每次我提交它时,它只显示我在PHP中输入的代码而不是输出。
HTML code:
<form action="testing.php" method="POST" >
<tr>
<td> Student No. </td>
<td class="info"> <input class="input" type="text" name="Number"/> </td> </br>
</tr>
<tr>
<td> Password: </td>
<td class="info"> <input class="input" type="password" name="Password"/> </td>
</tr>
<tr>
<td class="submit"><Input type="submit" value="Sign In"/></td>
</tr>
</form>
PHP代码:
<?php
$comments=""; if(isset($_POST["Number"])) { $comments = $_POST["Number"]; }
$checker=""; if(isset($_POST["Password"])) { $comments = $_POST["Password"]; }
?>