我想将我的提交数据显示到输入表单中

i want to display my submit data into input form

我想将我提交的数据显示到输入表单区域。第一种形式是我输入电影名称的地方,结果很好。我想将该结果显示到第二个表单输入区域 "Title" 和 "Description"。谢谢大家

我尝试回显值区域无效

<form action="rrr.php" method="post">
<input type="text" name="addmoviess"><br>
<input type="submit">
<br/> 
</form>

<form method="post" action="/admin/ajax_add_movie" id="ajax-movie-add" enctype="multipart/form-data">

<label>Title</label>
<input type="text" name="film_title" id="title" value="" class="input-xxlarge"/>
<br/>
<label>Description</label>
<textarea name="description" id="description" rows="5" value="" class="input-xxlarge"></textarea>
<br/></form>

<?php
include_once 'imdb.class.php';
$oIMDB = new IMDB($_POST['addmoviess']);

    if ($oIMDB->isReady) {
        echo '<p>' .
             '<br>'.
             'TITLE : ' .
             $oIMDB->getTitle() 

.
         '<br>'.
         'DESCRIPTION : ' .
         $oIMDB->getDescription() .
         '.</p>';
} else {
    echo '<p>not found!</p>';
}
?>

我想将"TITLE"和"DESCRIPTION"显示到第二个表格输入区。任何帮助或建议将不胜感激

您需要将第二个表格放在 PHP 代码之后。然后使用 <?php echo ... ?> 输出您希望它们出现的值:

<form action="rrr.php" method="post">
<input type="text" name="addmoviess"><br>
<input type="submit">
<br/> 
</form>

<?php
include_once 'imdb.class.php';
$oIMDB = new IMDB($_POST['addmoviess']);

if ($oIMDB->isReady) {
} else {
    echo '<p>not found!</p>';
}
?>

<form method="post" action="/admin/ajax_add_movie" id="ajax-movie-add" enctype="multipart/form-data">

<label>Title</label>
<input type="text" name="film_title" id="title" value="<?php echo $oIMDB->getTitle() ?>" class="input-xxlarge"/>
<br/>
<label>Description</label>
<textarea name="description" id="description" rows="5" value="" class="input-xxlarge"><?php echo $oIMDB->getDescription() ?></textarea>
<br/></form>