john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

php self calling form

<!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" lang="en" xml:lang="en">
<head></head>
<body>

<?php

    if( $_POST['form_filled'] == 1  )
    {
        echo stripslashes($_POST['html']);

        echo '<pre>';
        print_r($_POST);
        echo '</pre>';

    }
    else
    {

    echo '
      <form action="post.php" method="post">
        <input type="hidden" name="form_filled" value="1">
         <textarea name="html"></textarea><br />
         <input type="submit" /><br />
      </form>
    ';


    }
?>

   </body>
</html>

  • « php server phpinfo global variables user ip and dir
  • php security »

Published

Feb 6, 2010

Category

php

~45 words

Tags

  • calling 2
  • form 20
  • php 82
  • self 5