Mirari
Accès à un fichier
File: ajax.php - Tab length: 1 2 4 8 - Lines: on off - No wrap: on off

<?php

header ("Content-Type:text/html; charset=UTF-8");

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
        <head>
                <meta http-equiv="Content-Type" content="application/xhtml+xml;charset=UTF-8" />
                <script src="http://www.mirari.fr/template/pearl/inc/ajax.js" type="text/javascript"></script>
                <title>Test</title>
        </head>
        <body>
                <form action="" method="post">
                        <input id="text" name="text" type="text" />
                        <input type="submit" value="Form Send" />
                        <input onclick="XMLHttp.request('ajax.php', {text : document.getElementById ('text').value}, {action : 'extract', from : 'result', to : 'result'});" type="button" value="Ajax Send" />
                </form>
                <div id="result">
<?php

foreach ($_POST as $key => $val)
        echo "$key =&gt; $val<br />\n";

?>
                </div>
        </body>
</html>

Cet affichage est obtenu après traitement par le site et peut ne pas correspondre à l'état original du fichier
© r3c 2011 :: 3 ms