Mail() function
| From: | Rodrigo de Oliveira | Date: | Mon, 28 Oct 2002 18:39:16 +0000 |
| Subject: | Mail() function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-121765@lists.php.net to get a copy of this message | ||
Hi guys I'm having the following problem:
I have a mail() function that works by itself, coming from a html form, but when i tryied to put it
inside a more complex script it doesn't work.
The script is at the end of the message and it is suposed to receive data from a html form and use
it to insert data into a mySql database, wich it does without problems, and it is suposed to send an
e-mail to certain email with the info that was received from the form. The data is inserted without
problem into the MySql database, but the e-mail is not sent to the email informed in the mail()
script.
Rodrigo
SCRIPT:
<?
include "db_dados.php";
?>
<?
$sql="INSERT INTO tb_tao(nome, prof, area, tel, email, celular, registro, status) VALUES
('$nome','$prof','$area','$tel','$email','$celular','$registro','$status')";
$res=@mysql_query($sql,$id);
?>
<?
$Destino = "taocenter@rrb3.com";
$Remetente = "Formulário de Cadastro";
$Assunto = "Profissional Adicionado";
$Mensagem = "teste";
mail($Destino,"$Assunto",$Mensagem,"$Remetente");
?>
<meta http-equiv="refresh" content="1; URL=cadastrando.htm">