我開始學習Php e MySql。我創建了這個簡單的表單,將數據從一個頁面傳遞到另一個頁面。爲什麼不跑? 這是eta.html使用get方法將變量傳遞給其他頁面
<form action="pagina.php" method="get">
Eta' : <input type="text" name="eta"/>
<br>
Nome: <input type="text" name="nome"/>
<br>
<input type="submit" name="send" value="Invia Form"/>
</form>
這是pagina.php:
<?php
echo $_POST['eta'] ."<br />";
echo $_POST['nome'] ."<br />";
?>
當我點擊提交按鈕,這是結果:
感謝。
開幕標籤應該是'<?php' – thescientist
'<?php'.Not什麼你有那裏。 – potashin