Jump to content


Photo

Email


  • Faça o login para participar
3 replies to this topic

#1 FreezeBurn

FreezeBurn

    Turista

  • Usuários
  • 26 posts
  • Sexo:Não informado

Posted 24/01/2004, 10:03

<html>
<head><title>Start of the HTML </title></head>
<?

$actionmail=$_REQUEST['actionform'];
$name=$_REQUEST['name'];
$frommail=$_REQUEST['frommail'];
$tomail=$_REQUEST['tomail'];
$subheader=$_REQUEST['subheader'];

if($actionmail == "sendmail")
{
$frommail="From:".$frommail;
if(ereg('([[:alnum:]\.\-]+)(\@[[:alnum:]\.\-]+\.+)', $tomail))
{
if(ereg('([[:alnum:]\.\-]+)(\@[[:alnum:]\.\-]+\.+)', $frommail))
{
if(mail($tomail,$subheader,$mailbody, $frommail))
{
echo("<br>Mail successfully sent to $tomail.<br>");
} else
{
echo("<br>Oops! something didn't work right above, error on $tomail <br>");
}
} else
{
echo("<br>Mail Address may be incorrect!!! Please Check it!!");
}
} else
{
echo("<br>Mail Address may be incorrect!!! Please Check it!!");
}
} else
{
}
print(" <form method='POST' action= ".$_SERVER['PHP_SELF']." >");
print(" <input type='hidden' name='actionform' value='sendmail' >");
print(" <b>Name:</b><br> ");
print(" <input type='text' name='name' size='50' value=''><br>");
print(" <b>Your Email:</b><br>");
print(" <input type='text' name='frommail' size='50' value=''><br>");
print(" <b>Recipient Email:</b><br>");
print(" <input type='text' name='tomail' size='50' value=''><br>");
print(" <b>Subject:</b><br>");
print(" <input type='text' name='subheader' size='50' value=''><br>");
print(" <br><b>Comments:</b><br>");
print(" <textarea name='mailbody' cols='39' rows='10'></textarea><br>");
print(" <input type='submit' value='Submit'>");
print("</form>");

?>
</html>
Porque a função de nome não está aparecendo? Sabe, no e-mail aparece o seu nome, só que nesse script não está funcionando, como concerto?

#2 goiaba2000

goiaba2000

    Tô com sono!

  • Usuários
  • 1118 posts
  • Sexo:Não informado
  • Localidade:Sobradinho-DF

Posted 24/01/2004, 10:46

????? função de nome ??????
PHP + UML + OO + Flash + MySQL = IMBATIVEL

http://www.guilardi.com.br
- portifólio
http://www.deusehmais.com.br
- projeto atual

#3 FreezeBurn

FreezeBurn

    Turista

  • Usuários
  • 26 posts
  • Sexo:Não informado

Posted 24/01/2004, 12:24

É, quero dizer o treco que pega o dado name...

#4 Skull

Skull

    Tudo tem um começo

  • Usuários
  • 112 posts
  • Sexo:Não informado

Posted 13/08/2004, 00:21

o script está assim:
$frommail="From:".$frommail;

basta acrescentar .$name; para aparecer o nome.
vai ficar assim:

$frommail="From:" .$name. $frommail;

Edição feita por: Skull, 13/08/2004, 00:22.





1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq