<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?

Started By FreezeBurn, 24/01/2004, 10:03
3 replies to this topic
#1
Posted 24/01/2004, 10:03
#2
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
http://www.guilardi.com.br
- portifólio
http://www.deusehmais.com.br
- projeto atual
#3
Posted 24/01/2004, 12:24
É, quero dizer o treco que pega o dado name...
#4
Posted 13/08/2004, 00:21
o script está assim:
basta acrescentar .$name; para aparecer o nome.
vai ficar 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)