<i id='CjCk3'><tr id='CjCk3'><dt id='CjCk3'><q id='CjCk3'><span id='CjCk3'><b id='CjCk3'><form id='CjCk3'><ins id='CjCk3'></ins><ul id='CjCk3'></ul><sub id='CjCk3'></sub></form><legend id='CjCk3'></legend><bdo id='CjCk3'><pre id='CjCk3'><center id='CjCk3'></center></pre></bdo></b><th id='CjCk3'></th></span></q></dt></tr></i><div id='CjCk3'><tfoot id='CjCk3'></tfoot><dl id='CjCk3'><fieldset id='CjCk3'></fieldset></dl></div>

<small id='CjCk3'></small><noframes id='CjCk3'>

<tfoot id='CjCk3'></tfoot>

    <legend id='CjCk3'><style id='CjCk3'><dir id='CjCk3'><q id='CjCk3'></q></dir></style></legend>
    • <bdo id='CjCk3'></bdo><ul id='CjCk3'></ul>

    1. 输入 PHP 后显示带有回显的输入文本

      Display entered text with echo after input PHP(输入 PHP 后显示带有回显的输入文本)

      <tfoot id='mVeOD'></tfoot>
      <legend id='mVeOD'><style id='mVeOD'><dir id='mVeOD'><q id='mVeOD'></q></dir></style></legend>
        <tbody id='mVeOD'></tbody>

          • <small id='mVeOD'></small><noframes id='mVeOD'>

            <i id='mVeOD'><tr id='mVeOD'><dt id='mVeOD'><q id='mVeOD'><span id='mVeOD'><b id='mVeOD'><form id='mVeOD'><ins id='mVeOD'></ins><ul id='mVeOD'></ul><sub id='mVeOD'></sub></form><legend id='mVeOD'></legend><bdo id='mVeOD'><pre id='mVeOD'><center id='mVeOD'></center></pre></bdo></b><th id='mVeOD'></th></span></q></dt></tr></i><div id='mVeOD'><tfoot id='mVeOD'></tfoot><dl id='mVeOD'><fieldset id='mVeOD'></fieldset></dl></div>
              <bdo id='mVeOD'></bdo><ul id='mVeOD'></ul>
              1. 本文介绍了输入 PHP 后显示带有回显的输入文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我想做一些非常简单的事情.用户在 HTML 文本框中输入文本然后点击提交后,PHP 回显输入的文本.我到处搜索,我找不到怎么做!一定有什么办法!我想要这样的东西,除了 $foo 是输入的文本.

                I want to do something very simple. After a user enters text in an HTML text box then hits submit, the PHP echo's the entered text. I searched all over and I cant find out how to do it! There must be some way! I want something like this except $foo is what the entered text was.

                <html>
                <input type="text" name="something" value="$foo"/>
                <html>
                <?php
                echo $foo = "ben";
                echo "foo is $foo"; // foo is foobar
                
                
                ?>
                

                推荐答案

                FTFY

                <html>
                <head><title>some title</title></head>
                <body>
                  <form method="post" action="">
                    <input type="text" name="something" value="<?= isset($_POST['something']) ? htmlspecialchars($_POST['something']) : '' ?>" />
                    <input type="submit" name="submit" />
                  </form>
                
                <?php
                if(isset($_POST['submit'])) {
                  echo 'You entered: ', htmlspecialchars($_POST['something']);
                }
                ?>
                </body>
                <html>
                

                这篇关于输入 PHP 后显示带有回显的输入文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Converting string to MySQL timestamp format in php(在php中将字符串转换为MySQL时间戳格式)
                datetime to timestamp(日期时间到时间戳)
                PHP timestamp date to user timezone(PHP时间戳日期到用户时区)
                Converting TIMESTAMP to unix time in PHP?(在 PHP 中将 TIMESTAMP 转换为 unix 时间?)
                Convert ISO 8601 to unixtimestamp(将 ISO 8601 转换为 unixtimestamp)
                Finding days between 2 unix timestamps in php(在php中查找2个unix时间戳之间的天数)

                <small id='ej9Jw'></small><noframes id='ej9Jw'>

                <i id='ej9Jw'><tr id='ej9Jw'><dt id='ej9Jw'><q id='ej9Jw'><span id='ej9Jw'><b id='ej9Jw'><form id='ej9Jw'><ins id='ej9Jw'></ins><ul id='ej9Jw'></ul><sub id='ej9Jw'></sub></form><legend id='ej9Jw'></legend><bdo id='ej9Jw'><pre id='ej9Jw'><center id='ej9Jw'></center></pre></bdo></b><th id='ej9Jw'></th></span></q></dt></tr></i><div id='ej9Jw'><tfoot id='ej9Jw'></tfoot><dl id='ej9Jw'><fieldset id='ej9Jw'></fieldset></dl></div>
                • <bdo id='ej9Jw'></bdo><ul id='ej9Jw'></ul>

                  <legend id='ej9Jw'><style id='ej9Jw'><dir id='ej9Jw'><q id='ej9Jw'></q></dir></style></legend>

                          <tfoot id='ej9Jw'></tfoot>
                            <tbody id='ej9Jw'></tbody>