html - post entire form php -
this question has answer here:
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 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); ?>