简体   繁体   English

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

[英]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.

相关问题 我希望我的php表单提交数据并在同一页面上重定向,但选项卡不同 - I want my php form to submit data and redirect on the same page but different tab 按提交后,我希望它显示第二个表格 - After pressing submit, I want it to display a 2nd form 如何在 Laravel 6 中提交输入数据以显示在另一个视图中 - How do I form submit input data to display in another view in Laravel 6 我正在尝试将表单链接到我的PHP页面,当他单击“提交”按钮时,我想将用户的输入输出到该页面上 - I'm trying to link my form to my PHP page, and I want to print out the user's input onto that page when he clicks the submit button 我想从一个表中选择名称并显示在我的页面中 - i want select name form one table and display in my page 我想添加多文件上传并在表单中显示 - I want to add multi file upload and display in my form 提交按钮在表格数据下呈现。 我只需要一个提交按钮 - Submit buttons render under table data. I want only one submit button for the form 我希望我的表单输入为整数…,但前提是这样提交 - I want my form input as an integer… but only if it was submitted as such 当我提交表单输入类型=文件以使用 php 发送图像时,我想重定向到另一个页面 - when i submit form input type=file for send image with php i want redirect to an other page 为什么我输入的表单提交不可点击? - Why is my input submit of my form not clickable?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM