html - post entire form php -


i'm creating script on website echo contents of entire form. html code looks this:

<form action ="forma.php" method ="post" name="form-txt">    first name:<br>    <input type="text" name="firstname"><br>    last name:<br>    <input type="text" name="lastname">            <input type="submit" name="submitsave" value ="submit">  </form>
php code looks this:

<?php error_reporting(e_all); ini_set('display_errors', 1); //use html name element attach html php scripts //v-----------------=|txt file codes|=-----------------v $text = $_post["form-txt"]; echo $text;  ?> 

when run form, error thrown:

notice: undefined index: form-txt in /homepages/31/d585123241/htdocs/mail/forma.php on line 7

how can make entire form echos, no specific elements referenced, form.

like @eatpeanutbutter says

<?php     error_reporting(e_all);     ini_set('display_errors', 1);     //use html name element attach html php scripts      //v-----------------=|txt file codes|=-----------------v     $text = $_post;      var_dump($text);       ?> 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo