且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用POST将数据从一个textarea传递到另一个页面上的另一个textarea

更新时间:2023-01-08 11:40:29

您必须编写textarea的内容BETWEEN

You have to write the content of the textarea BETWEEN the tags, not into a value attribute:

<textarea name="background2" cols="71" rows="10" id="backgroundtext2">
<?php echo $_POST["background"]; ?></textarea>

请注意,此代码极度不安全!如果$ _POST [background]包含HTML,它将压低你的html代码等。

Be aware that this code is extremly unsafe! If the $_POST["background"] contains HTML it will be brake down your html-code etc.