[英]i want to display my submit data into input form
I want to display my submit data into input form area.我想将我的提交数据显示到输入表单区域。 The first form is where i input movie name and result came out fine.
第一种形式是我输入电影名称的地方,结果很好。 I want to display that result into the second form input area "Title" and "Description".
我想将该结果显示到第二个表单输入区域“标题”和“描述”中。 Thank you all.
谢谢你们。
i try to echo into the value area not working我尝试回显到价值区域不起作用
<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>';
}
?>
I want to display "TITLE" and "DESCRIPTION" into the 2nd form input area.我想在第二个表单输入区域显示“TITLE”和“DESCRIPTION”。 Any help or suggestion would be much appreciated
任何帮助或建议将不胜感激
You need to put your second form after the PHP code.您需要将第二个表格放在 PHP 代码之后。 Then use
<?php echo... ?>
to output the values where you want them to appear:然后使用
<?php echo... ?>
到 output 您希望它们出现的值:
<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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.