- Home
- Categorie
- Coding e Sistemistica
- Coding
- invio modulo
- 
							
							
							
							
							invio modulociao a tutti io o creato un modulo da inviare alla mia mail ma purtroppo me lo invia ma nn completo come posso fare ecco il codice chi mi può correggere prima pagina: <style type="text/css"> <!-- .Stile2 {font-size: 16px} --> </style><form name="form1" method="post" action="mail1.php"> <table width="95%" align="center" > <tr> <td colspan="2"><div align="left"><strong>MODULO ISCIZIONE TORNEO </strong></div></td> </tr> <tr> <td width="16%"><strong>Nome</strong></td> <td width="84%"><input name="nome" type="text"></td> </tr> <tr> <td><strong>Cognome</strong></td> <td><input name="cognome" type="text"></td> </tr> <tr> <td><strong>Citta</strong></td> <td><input name="citta" type="text"></td> </tr> <tr> <td><strong>Indirizzo E-mail </strong></td> <td><input name="mail" type="text"></td> </tr> <tr> <td><div align="justify"><strong>Societa</strong></div></td> <td><input name="società" type="text" id="società"></td> </tr> <tr> <td colspan="2"><div align="left"><strong><span class="Stile2">Squadre e Numero partecipanti </span></strong></div></td> </tr> <tr> <td><label> <select name="squadra1" id="squadra1"> <option>U14M</option> <option>U14F</option> <option>U16M</option> <option>U16F</option> <option>U18M</option> <option>U18F</option> <option>SERIEB</option> </select> </label></td> <td><label> <input name="squadra1" type="text" id="squadra1" /> </label></td> </tr> <tr> <td><select name="squadra2" id="squadra2"> <option>U14M</option> <option>U14F</option> <option>U16M</option> <option>U16F</option> <option>U18M</option> <option>U18F</option> <option>SERIEB</option> </select></td> <td><label> <input name="squadra2" type="text" id="squadra2" /> </label></td> </tr> <tr> <td><select name="squadra3" id="squadra3"> <option>U14M</option> <option>U14F</option> <option>U16M</option> <option>U16F</option> <option>U18M</option> <option>U18F</option> <option>SERIEB</option> </select></td> <td><label> <input name="squadra3" type="text" id="squadra3" /> </label></td> </tr> <tr> <td><select name="squadra4" id="squadra4"> <option>U14M</option> <option>U14F</option> <option>U16M</option> <option>U16F</option> <option>U18M</option> <option>U18F</option> <option>SERIEB</option> </select></td> <td><label> <input name="squadra4" type="text" id="squadra4" /> </label></td> </tr> <tr> <td><select name="squadra5" id="squadra5"> <option>U14M</option> <option>U14F</option> <option>U16M</option> <option>U16F</option> <option>U18M</option> <option>U18F</option> <option>SERIEB</option> </select></td> <td><label> <input name="squadra5" type="text" id="squadra5" /> </label></td> </tr> <tr> <td><strong>Accompagnatori</strong></td> <td><label> <input name="Accompagnatori" type="text" id="Accompagnatori" /> </label></td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"><div align="center"> <label> <input type="reset" name="Submit2" value="Cancella Modulo" /> </label> </div></td> </tr> <tr> <td colspan="2"><div align="center"> <input type="submit" name="Submit" value="Invia"> </div></td> </tr> </table> <p> </p> </form>seconda pagina: 
 [php]
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <title>Invio Modulo</title>
 </head>
 <?php
 // L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
 $to = "MIA MAIL";
 // IL SOGGETTO DELLA MAIL
 $subject = "Modulo proveniente dal sito MIO SITO";
 // COSTRUZIONE DEL CORPO DEL MESSAGGIO
 $body = "Modulo iscrizione torneo:\n\n";
 $body .= "Nome: " . trim(stripslashes($_POST["nome"])) . "\n";
 $body .= "cognome: " . trim(stripslashes($_POST["cognome"])) . "\n";
 $body .= "Città: " . trim(stripslashes($_POST["citta"])) . "\n";
 $body .= "Socetà: " . trim(stripslashes($_POST["società"])) . "\n";
 $body .= "Mail: " . trim(stripslashes($_POST["mail"])) . "\n";
 $body .= "squadra1: " . trim(stripslashes($_POST["squadra1"])) . "\n";
 $body .= "squadra2: " . trim(stripslashes($_POST["squadra2"])) . "\n";
 $body .= "squadra3: " . trim(stripslashes($_POST["squadra3"])) . "\n";
 $body .= "squadra4: " . trim(stripslashes($_POST["squadra4"])) . "\n";
 $body .= "squadra5: " . trim(stripslashes($_POST["squadra5"])) . "\n";
 $body .= "Accompagnatori: " . trim(stripslashes($_POST["Accompagnatori"])) . "\n";
 // INTESTAZIONI SUPPLEMENTARI
 $headers = "From: Modulo utenti<MIA MAIL>";
 // INVIO DELLA MAIL
 if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...
 echo "La mail è stata inoltrata con successo.";
 } else {// ALTRIMENTI...
 echo "Si sono verificati dei problemi nell'invio della mail.";
 }
 ?></body>
 </html>
 [/php]
 
- 
							
							
							
							
							Per "non completo" cosa intendi? manda qualcosa ma non tutto? e cosa manda o cosa manca?? 
 
- 
							
							
							
							
							Dal Regolamento: Se secondo voi è necessario, postate il pezzo di codice interessato. NON POSTATE TUTTO LO SCRIPT. 
 Se ricevete un errore, controllate la riga di errore e postate quel blocco. Di solito 3-4 righe già bastano ad individuare cosa c'è che non va. Se non fosse così sarà chi prova a rispondervi a chiedere maggiori info.
 Utilizzate sempre gli appositi TAG [ PHP ] [ /PHP ] e [ CODE ] [ /CODE ] (senza spazi) quando volete postare il vostro codice.