-
[Script] Invio e-mail
Vi volevo chiedere se esiste una script che quando un utente preme su un bottone in automatico mi invia un e-mail con i dati che sono stati scritti nei box esempio D1 ecc e anche nei box di selezione cioe dove sta Si o No
Vorrei che mi arrivasse un e-mail cosi:
NOME: DATIINSERITI NEL BOX
ecc
grazie!
-
-
-
-
ciao ho fatto questo codice
Codice PHP:
<?php
$to = [email]aciernomarco@hotmail.com[/email];
$subject = $_POST[\'T2\'].;
$message = $_POST[\'S1\'].;
$headers = 'From: $_POST[\'T1\'].' . "\r\n" .
'Reply-To: [email]webmaster@example.com[/email]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
ma mi bugga cioe mi da errore stringa 2!
-
Uddio, mai visto un codice così scombinato...usa i tag [php]...
Codice PHP:
<?php
$to = "aciernomarco@hotmail.com";
$subject = $_POST["T2"];
$message = $_POST["S1"];
$postt1 = $_POST["T1"];
$headers = "From: {$postt1}\r\n";
$headers .= "Reply-To: webmaster@example.com\r\n";
$headers .= "X-Mailer: PHP ".phpversion();
mail($to, $subject, $message, $headers);
?>
-
arriva ma male cioe,esce nessun oggetto esce apache altervista sulle e mail.
Codice Pagina:
Codice:
<html>
<head>
<meta http-equiv="Content-Language" content="it">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Software Community 2009</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<p> </p>
<div style="position: absolute; width: 1120px; height: 752px; z-index: 1; left: 7px; top: 6px; border-style: solid; border-width: 1px" id="livello1">
<img src="http://softwareweb09.altervista.org/images/header.gif" alt="Logo"><div style="position: absolute; width: 211px; height: 632px; z-index: 1; left: 1px; top: 117px; border-style: solid; border-width: 0px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" id="livello2">
<table border="1" width="100%" id="table6">
<tr>
<td>
<p align="center"><img src="http://softwareweb09.altervista.org/images/link.gif" alt="Menu"></td>
</tr>
</table>
<p> </div>
<div style="position: absolute; width: 575px; height: 629px; z-index: 2; left: 216px; top: 117px" id="livello3">
<table border="1" width="100%" id="table1">
<tr>
<td>
<p align="center">Come Contattarci:</td>
</tr>
</table>
<FORM action="ricevuta.php" method="POST">
<!--webbot bot="SaveResults" U-File="_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<fieldset style="padding: 2">
<legend><b>Tua E-Mail</b></legend>
<input type="text" name="T1" size="20"></fieldset></form>
<form action="ricevuta.php" method="POST">
<!--webbot bot="SaveResults" U-File="_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<fieldset style="padding: 2">
<legend><b>Oggetto</b> </legend>
<input type="text" name="T2" size="20"></fieldset></form>
<form action="ricevuta.php" method="POST">
<!--webbot bot="SaveResults" U-File="_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<fieldset style="padding: 2">
<legend><b>Messaggio</b> </legend>
<textarea rows="11" name="S1" cols="61"></textarea></fieldset></form>
<form action="ricevuta.php" method="POST">
<!--webbot bot="SaveResults" U-File="_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<p>
<input type="submit" value="Invia" name="B1"></form></p>
</form>
<p>A:<br>
<input type="text" name="T3" size="15" value="aciernomarco@hotmail.com"><br>
( Non cambiare indirizzo e mail!!! )</p>
<table border="1" width="100%" id="table7">
<tr>
<td>
<p align="center">Se invece vuoi...</td>
</tr>
</table>
<p align="center"><br>
Se non vuoi usare il modulo previsto sopra,Potete contattarci hai
seguenti indirizzi e-mail:</p>
<p align="center">MSN: <a href="mailto:aciernomarco@hotmail.com">
aciernomarco@hotmail.com</a><br>
E-MAIL: <a href="mailto:softwarecommunitysupport@gmail.com">
softwarecommunitysupport@gmail.com</a><br>
Oppure E-MAIL ( ALTERVISTA ) :
<a href="mailto:softwareweb09@altervista.org">
softwareweb09@altervista.org</a><br>
</div>
<div style="position: absolute; width: 182px; height: 115px; z-index: 3; left: 792px; top: 117px" id="livello4">
<table border="1" width="100%" id="table4">
<tr>
<td>
<p align="center">Forum Generale</td>
</tr>
</table>
<p align="center"><br>
<a href="forum">Home Forum</a><br>
<a href="http://softwareweb09.altervista.org/forum/ucp.php">User CP</a><br>
<a href="http://softwareweb09.altervista.org/forum/ucp.php?mode=register">
Registrati</a><br>
</div>
<div style="position: absolute; width: 181px; height: 516px; z-index: 4; left: 794px; top: 233px" id="livello5">
<table border="1" width="100%" id="table5">
<tr>
<td>
<p align="center">Contatti:</td>
</tr>
</table>
<p align="center">MSN: <a href="mailto:aciernomarco@hotmail.com">
aciernomarco@hotmail.com</a><br>
E-MAIL: <a href="mailto:softwarecommunitysupport@gmail.com">
softwarecommunitysupport</a><br>
<a href="mailto:softwarecommunitysupport@gmail.com">@gmail.com</a><br>
Oppure E-MAIL <br>
( ALTERVISTA ) : <a href="mailto:softwareweb09@altervista.org">
softwareweb09@altervista.org</a><br>
</div>
<p> </div>
</body>
</html>
-
In fondo alla mail verrà sempre una riga per segnalare l'eventuale email di spam :wink:
-
lo so ma non esce proprio il messaggio