PHP打印$ _POST ['something']没有刷新

时间:2016-02-17 10:44:47

标签: javascript php jquery html html5

我收到了这段代码..

<!--Speech Bar-->
    <div clasS="speech_bar">
        <iframe name="speechs" style="display:none;"></iframe>
        <form method="get" target="speechs">
            <input type="text" id="speech_input_welcome" name="speech_input_welcome" placeholder="Click here to speak..">  
            <input type="submit" id="speech_welcome" name="speech_welcome" value="Say">
        </form>
    </div>

然后这个:

<!--Welcome Room-->
    <div class="welcome_room">
        <center>
            <img src="http://www.habborator.org/exec/speech/bubble.php?name=Frank&text=Hello%20there!%20I%20am%20Frank%20and%20today%20I%20will%20help%20you.&format=say">
            <br />
            <img src="http://www.habborator.org/exec/speech/bubble.php?name=Frank&text=To%20enter%20Project.%20HTML..%20Please%20say%20if%20you're%20registrated%20or%20not.&format=say">
            <br />
            <img src="http://www.habborator.org/exec/speech/bubble.php?text=Write%20'registrated'%20or%20'new'.&format=whisper">
        </center>
        <?php
        if(isset($_POST['speech_welcome']))
        {
            if($_POST['speech_input_welcome'] == 'registrated')
            { ?>
            <center>
                <img src="http://www.habborator.org/exec/speech/bubble.php?name=You&text=Registrated.&format=say">
                <br />
                <img src="http://www.habborator.org/exec/speech/bubble.php?name=Frank&text=Alright!%20Welcome%20back%20to%20Project.%20HTML%20then!%20Tell%20me%20your%20name%20please.&format=say">
            </center>
            <?php }
            else if($_POST['speech_input_welcome'] == 'new')
            { ?>
            <center>
                <img src="http://www.habborator.org/exec/speech/bubble.php?name=You&text=New.&format=say">
                <br />
                <img src="http://www.habborator.org/exec/speech/bubble.php?name=Frank&text=Alright!%20Welcome%20to%20Project.%20HTML%20then!%20Tell%20me%20a%20name%20please.&format=say">
            </center>
            <?php }
            else
            { ?>
            <center>
                <img src="http://www.habborator.org/exec/speech/bubble.php?name=You&text=<?php echo $_POST['speech_input_welcome']; ?>&format=say">
                <br />
                <img src="http://www.habborator.org/exec/speech/bubble.php?name=Frank&text=Sorry%20I%20couldn't%20understand%20you.&format=say">
            </center>
            <?php }
        }
        ?>
    </div>

我正在尝试做什么: 就像回复$_POST['speech_input_welcome']而不刷新那边一样,当我得到iframe disabled refreshment时。 我尝试使用echo $center2 = 'lalal';但是它不会加载$_POST 而不刷新,而且我真的不能使用MySQL或类似的东西进行此过程。

1 个答案:

答案 0 :(得分:0)

这可能会有所帮助:)

http://api.jquery.com/load/

此致