将文本区域值传递到另一页


Passing text area values to another page

page1.php

<form action ="page2.php" method="post">
<input type="text" name="username">
<input type="submit" value="Send">
</form>

page2.php

<form action ="page2.php" method="post">
<input type="text" name="username" value="<?php echo $_POST['username']; ?> />
<input type="submit" value="Send">
</form>

大家好,这还可以,但当我转到page2.php时,文本框中保存的值正在读取jason /><input type=。我尝试了各种方法试图删除/><input type=。有人能说明我的错误吗?干杯CPM

   <input type="text" name="username" value="<?php echo $_POST['username']; ?>" />

您忘记了value属性的右引号。