2
It is possible to grab all the variables of a form at once to send to an email or I need to declare one at a time?
<form action="welcome_get.php" method="get">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>
<?php echo $_GET["name"]; ?>
<?php echo $_GET["email"]; ?>
I had to write each one’s name
It is possible to do for example through a while or something like that not to have to write one by one?
How would you do it ? echo $_GET; ?
– Amadeu Antunes
appears in this way :"{ ["datai"]=> string(0) "" ["weeks"]=> string(0) "" ["fullname"]=> string(0) "" ["Cpf"]=> string(0) "" ["databirth"]=> string(0) "" ["mail"]=> string(0) "" ["telf"]=> string(0) "" ["Cell"]=> string(0) "" ["nasc"]=> string(0) "" ["pass"]=> string(0) "" ["ppass"]=> string(0) "" ["datav"]=> string(0) "" ["gender"]=> string(5) "Other" }"
– Amadeu Antunes
But then he gives me extra :P
– Amadeu Antunes
try using the function
filter_input_array($_POST)
, an example;$input = filter_input_array($_POST);
and to access$input["name"]
– RFL