PHP 打印 $_POST['something'],无需刷新


PHP Printing $_POST['something'] without refresh

我得到了这个代码。

<!--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']一样,因为我得到了一个disabled refreshmentiframe.我尝试使用echo $center2 = 'lalal';但它不会在不刷新的情况下加载$_POST,而且我真的不能将MySQL或类似的东西用于此过程。

这可能会

有所帮助:)

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

问候