0
我想打印出頁面上的用戶名文本框的值,這是我的代碼,據我所知,這應該工作。我似乎得到了一個名爲Use of undefined constant的錯誤。
<html>
<head></head>
<body>
<form method = "post" action = "index.php">
Username:<input type = "text" name = "username">
<br>
<input type = "Submit" name = "Submit1">
<?php
$username1 = $_POST['username'];
print username1;
?>
</form>
</body>
</html>
您忘記了美元符號! 'print $ username1' –