I would like to know, if there is a script, a way to send the content contained in the textarea to an email. Thanks in advance!
I would like to know, if there is a script, a way to send the content contained in the textarea to an email. Thanks in advance!
You can get the value of <textarea>
by method POST
of Form
, example:
<form method="post" action="query.php">
<textarea name="texto"></textarea>
<input type="submit" />
</form>
And then pick up with $_POST
of php:
$conteudo = $_POST['texto'];
And send the email normally:
mail($destinatario, $assunto, $conteudo, "From: [email protected]");
//Onde a variavel $assunto contem o assunto do email e $destinatario, pra quem o email será enviado
php.ini
! See this , if you have more questions. Or official documentation .