Obbligare un utente ad acconsentire al trattamento dei dati personali

muppa

Nuovo Utente
26 Ott 2010
9
0
0
Ciao a tutti come da titolo, ho costruito un form in php dove un file .php viene caricato tramite frames in una pagina html.
Il mio problema è quello di fare in modo che l'utente accetti le condizione di trattamento dei dati personali, prima di farlo proseguire.
Come posso risolvere?
Grazie per le eventuali risposte.
 

alessandro1997

Utente Attivo
6 Ott 2009
5.302
1
0
26
Roma
alessandro1997.netsons.org
Scusami, perché non metti un semplicissimo checkbox?
HTML:
<input type="checkbox" name="privacy" value="1" /> Acconsento al trattamento dei miei dati personali
E poi nel file PHP che processa il form:
PHP:
if($_POST['checkbox'] == 1)
{
    // prosegui
}
else
{
    // errore
}
 

muppa

Nuovo Utente
26 Ott 2010
9
0
0
Ciao, inanzitutto grazie per la solerzia con cui mi hai risposto.
Ho provato ad usare la soluzione che mi hai proposto, ma non riesco a farla funzionare.
Principalmente perchè non conosco molto il pHP.
Il problema credo che stia dove ho inserito le righe di codice.
Sempre nel file form.php ho inserito la check box come indicato.
Poi la seconda parte ho provato ad inserirla quà:
PHP:
/table>
      </form>
      <?php
	  if($_POST['checkbox'] == 1) 
{ 
    // prosegui 
} 
else 
{ 
    // errore 
}  
}else if($passo=='1'){
	$destinatario  = "<" . $_REQUEST["email"] . ">";
	$oggetto = "info";
	$corpodelmessaggio = '

Non sò è il posto giusto?
 

alessandro1997

Utente Attivo
6 Ott 2009
5.302
1
0
26
Roma
alessandro1997.netsons.org
Credo di non essermi spiegato bene. Al posto di:
PHP:
// prosegui
Devi inserire il codice PHP che verrebbe eseguito se non ci fosse nessun errore. Nel tuo caso l'invio del messaggio.
Al posto di:
PHP:
// errore
Devi inserire un'istruzione per visualizzare un messaggio di errore, ad esempio:
PHP:
echo 'Devi dare il consenso al trattamento dei dati personali.';
 

muppa

Nuovo Utente
26 Ott 2010
9
0
0
Ho provato ma non c'è verso che riesca a farlo andare.
Ti riporto per esteso il codice che ho utilizzato per fare il form. Potresti gentilmente indicarmi dove inserire le righe di codice?
Spero di non fare troppa confusione ti riporto tutto il codice della pagina .php che viene caricata nella pagina .html
PHP:
<html>
<head>
<title>Titolo</title>
<META NAME="DC.Title" CONTENT="Titolo">
<META NAME="keywords" CONTENT="">
<meta name="description" content="titolo">
<meta http-equiv="Content-Language" content="IT">
<meta name="author" content="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


<style type="text/css">
<!--
.Stile1 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
}
.Stile2 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #0099FF;
}
.Stile5 {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	font-size: 14px;
	color: #000000;
}
.Stile10 {color: #000000; font-family: "Times New Roman", Times, serif; }
.Stile11 {color: #000000}
.Stile14 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; }
.Stile16 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; }
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="320" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
  <tr>
    <td><?php
$passo=$_GET["passo"];
if($passo!='1'){
?>
        <form action="prova.php?passo=1" method="post" name="modulo" id="modulo">
          <table width="320" border="0" align="center" cellpadding="0" cellspacing="0">
            
            <tr>
              <td width="88" align="center" valign="top" class="testo">&nbsp;</td>
              <td width="232" align="center" valign="top" class="testo">DATI </td>
            </tr>
            <tr>
              <td width="88" align="right"><span class="Stile14">Nome e Cognome</span></td>
              <td width="232" align="right"><input name="nome" type="text" id="nome"></td>
            </tr>
            <tr>
              <td width="88" height="5" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
              <td width="232" height="5" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
            </tr>

            <tr>
              <td width="88" align="right"><span class="Stile14">Via</span></td>
              <td width="232" align="right"><input name="via" type="text" id="via"></td>
            </tr>
            <tr>
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
            </tr>
            <tr>
              <td height="10" align="right" class="Stile14">Numero</td>
              <td height="10" align="right"><input name="numero" type="text" id="numero"></td>
            </tr>
            <tr>
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
            </tr>
            <tr>
              <td height="10" align="right" class="Stile14">CAP</td>
              <td height="10" align="right"><input name="cap" type="text" id="cap"></td>
            </tr>
            <tr>
            <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
            </tr>
            <tr>
              <td width="88" height="10" align="right"><span class="Stile14">Città</span></td>
              <td width="232" height="10" align="right"><input name="citta" type="text" id="citta"></td>
            </tr>
            <tr>
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
            </tr>
            <tr>
              <td height="10" align="right" class="Stile14">Provincia</td>
              <td height="10" align="right"><input name="provincia" type="text" id="provincia"></td>
            </tr>
            <tr>
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
            </tr>

            <tr>
              <td width="88" align="right"><span class="Stile14">Telefono</span></td>
              <td width="232" align="right"><input name="telfax" type="text" id="telfax"></td>
            </tr>
            <tr>
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
            </tr>
            <tr>
              <td height="10" align="right"><span class="Stile14">Fax</span></td>
              <td height="10" align="right"><input name="telfax2" type="text" id="telfax2"></td>
            </tr>
            <tr>
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
            </tr>
            <tr>
              <td height="10" align="right"><span class="Stile14">Cellulare</span></td>
              <td height="10" align="right"><input name="telfax3" type="text" id="telfax3"></td>
            </tr>
            <tr>
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
            </tr>

            <tr>
              <td width="88" align="right"><span class="Stile14">E-mail</span></td>
              <td width="232" align="right"><input name="email" type="text" id="email"></td>
            </tr>
            <tr>
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
            </tr>
            
            <tr>
              <td height="10" align="right" class="Stile14">Pagamento: </td>
              <td height="10" align="right"><table width="232" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="right"><span class="Stile14">Bonifico</span>
                  <input name="ctel2" type="radio" value="bonifico"></td>
                  <td align="right"><span class="Stile14">Vaglia</span>
                  <input name="ctel2" type="radio" value="vaglia"></td>
                </tr>
              </table></td>
            </tr>
            
            
            <tr>
              <td height="10" colspan="2" align="right"><img src="../../../immagini/pixel.gif" width="1" height="1"><img src="../../../immagini/pixel.gif" width="1" height="1"></td>
            </tr>

            <tr>
              <td width="88" align="right" valign="top" class="Stile14">Note</td>
              <td width="232" align="right"><textarea name="richieste" rows="8" wrap="VIRTUAL" id="richieste"></textarea></td>
            </tr>
            <tr>
              <td width="88" height="10" align="right"><img src="../../../immagini/pixel.gif" width="1" height="1"></td>
              <td width="232" height="10" align="right"><img src="../../../immagini/pixel.gif" width="1" height="1"></td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="top" class="Stile14"><iframe frameborder="0" id="content" name="content" src="informativa.html" width="300
    " height="300" ></iframe></td>
            </tr>
            <tr>
              <td align="right" class="Stile14">Acconsento al trattamento dei dati</td>
              <td align="right"><table width="232" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="right"><span class="Stile14">Si </span>
                      <input name="ctel3" type="radio" value="si"></td>
                  <td align="right">&nbsp;</td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td align="right">&nbsp;</td>
              <td align="right">&nbsp;</td>
            </tr>
            <tr>
              <td width="88" align="right">&nbsp;</td>
              <td width="232" align="right"><input name="Submit" type="submit" value="Invia richiesta"></td>
            </tr>
            <tr>
              <td align="right">&nbsp;</td>
              <td height="10" align="right"><input name="Submit2" type="reset" value="Annulla"></td>
            </tr>
            <tr>
              <td width="88" align="right">&nbsp;</td>
              <td width="232" height="10" align="right"><img src="../../../immagini/pixel.gif" width="1" height="1"></td>
            </tr>
          </table>
      </form>
      <?php
}else if($passo=='1'){
	$destinatario  = "<" . $_REQUEST["email"] . ">";
	$oggetto = "oggetto";
	$corpodelmessaggio = '
	<html>
	<head>
	 <title>Titolo</title>
	</head>
	<body>
	<p>Grazie per aver scelto il nostro sito </p>
	<p>Le sue richieste saranno esaudite al pi&ugrave; presto</p>
	<p>Nome</p>
	</body>
	</html>
	';
	$headers = "From: [email protected]\r\n";
	$headers .= "MIME-Version: 1.0\r\n";
	//unique boundary
	$boundary = uniqid("inviodati");
	//tell e-mail client this e-mail contains//alternate versions
	$headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n";
	//HTML version of message
	$body .= "--$boundary\r\n" .
	   "Content-Type: text/html; charset=ISO-8859-1\r\n" .
	   "Content-Transfer-Encoding: base64\r\n\r\n";
	$body .= chunk_split(base64_encode($corpodelmessaggio));
	//send message
	mail($destinatario, $oggetto, $body, $headers);
//seconda mail
	$oggetto = "Richiesta informazioni dal sito";
	$corpodelmessaggio = '
	<html>
	<head>
	 <title>Titolo</title>
	</head>
	<body>
	<p>Nome e cognome: ' . $_REQUEST["nome"] . '</p>
	<p>via: ' . $_REQUEST["via"] . '</p>
	<p>numero: ' . $_REQUEST["numero"] . '</p>
	<p>cap: ' . $_REQUEST["cap"] . '</p>
	<p>città: ' . $_REQUEST["citta"] . '</p>
	<p>provincia: ' . $_REQUEST["provincia"] . '</p>
	<p>Telefono: ' . $_REQUEST["telfax"] . '</p>
	<p>Fax: ' . $_REQUEST["telfax2"] . '</p>
	<p>Cellulare: ' . $_REQUEST["telfax3"] . '</p>
	<p>E-mail: ' . $_REQUEST["email"] . '</p>
	<p>tipo pagamento: ' . $_REQUEST["ctel2"] . '</p>
	<p>Acconsento al trattamento dei dati: ' . $_REQUEST["ctel3"] . '</p>
	<p>note: ' . $_REQUEST["richieste"] . '</p>
	
	</body>
	</html>
	';
	$headers = "From: [email protected]\r\n";
	$headers .= "MIME-Version: 1.0\r\n";
	//unique boundary
	$boundary = uniqid("inviodati");
	//tell e-mail client this e-mail contains//alternate versions
	$headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n";
	//HTML version of message
	$body .= "--$boundary\r\n" .
	   "Content-Type: text/html; charset=ISO-8859-1\r\n" .
	   "Content-Transfer-Encoding: base64\r\n\r\n";
	$body .= chunk_split(base64_encode($corpodelmessaggio));
	//send message
	mail("[email protected]", $oggetto, $body, $headers);
?>
        <table width="280" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><div align="center" class="titolo Stile2"><strong>Riepilogo 
            informazioni inviate</strong><br>
            </div></td>
          </tr>
          <tr>
            <td height="20">&nbsp;</td>
          </tr>
          <tr>
            <td><span class="Stile1 Stile11">Nome e cognome: </span> <span class="testo"><?php echo($_REQUEST["nome"]) ?></span></td>
          </tr>
          <tr>
            <td height="10"><img src="../../../immagini/pixel.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td><span class="Stile16">Via: </span> <span class="testo"><?php echo($_REQUEST["via"]) ?></span></td>
          </tr>
          <tr>
            <td height="10"><img src="../../../immagini/pixel.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td><span class="Stile16">Citt&agrave;: </span> <span class="testo"><?php echo($_REQUEST["citta"]) ?></span></td>
          </tr>

          <tr>
            <td height="10"><img src="../../../immagini/pixel.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td><span class="Stile16">Telefono: </span> <span class="testo"><?php echo($_REQUEST["telfax"]) ?></span></td>
          </tr>
          <tr>
            <td height="10"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td height="10"><span class="Stile16">Fax: </span> <span class="testo"><?php echo($_REQUEST["telfax2"]) ?></span></td>
          </tr>
          <tr>
            <td height="10"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td height="10"><span class="Stile16">Cellulare: </span> <span class="testo"><?php echo($_REQUEST["telfax3"]) ?></span></td>
          </tr>
          <tr>
            <td height="10"><img src="../../../immagini/pixel.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td><span class="Stile16">E-mail: </span> <span class="testo"><?php echo($_REQUEST["email"]) ?></span></td>
          </tr>
          
          
          <tr>
            <td height="10"><img src="../../../immagini/pixel.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td><span class="Stile16">Note: </span> <span class="testo"><?php echo($_REQUEST["richieste"]) ?></span></td>
          </tr>
          <tr>
            <td height="10"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td><span class="Stile16"><strong>Acconsento al trattamento dei dati</strong>:<span class="testo"><?php echo($_REQUEST["ctel3"]) ?></span></span></td>
          </tr>
        </table>
    <?php
}
?>    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

</body>
</html>
 

alessandro1997

Utente Attivo
6 Ott 2009
5.302
1
0
26
Roma
alessandro1997.netsons.org
Prova a vedere se così funziona, sempre sostituendo il commento con la visualizzazione del messaggio di errore:
PHP:
<html> 
<head> 
<title>Titolo</title> 
<META NAME="DC.Title" CONTENT="Titolo"> 
<META NAME="keywords" CONTENT=""> 
<meta name="description" content="titolo"> 
<meta http-equiv="Content-Language" content="IT"> 
<meta name="author" content=""> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 


<style type="text/css"> 
<!-- 
.Stile1 { 
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 10px; 
} 
.Stile2 { 
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 12px; 
    color: #0099FF; 
} 
.Stile5 { 
    font-family: Arial, Helvetica, sans-serif; 
    font-weight: bold; 
    font-size: 14px; 
    color: #000000; 
} 
.Stile10 {color: #000000; font-family: "Times New Roman", Times, serif; } 
.Stile11 {color: #000000} 
.Stile14 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; } 
.Stile16 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; } 
--> 
</style> 
</head> 
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> 
<table width="320" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC"> 
  <tr> 
    <td><?php 
$passo=$_GET["passo"]; 
if($passo!='1'){ 
?> 
        <form action="prova.php?passo=1" method="post" name="modulo" id="modulo"> 
          <table width="320" border="0" align="center" cellpadding="0" cellspacing="0"> 
             
            <tr> 
              <td width="88" align="center" valign="top" class="testo">&nbsp;</td> 
              <td width="232" align="center" valign="top" class="testo">DATI </td> 
            </tr> 
            <tr> 
              <td width="88" align="right"><span class="Stile14">Nome e Cognome</span></td> 
              <td width="232" align="right"><input name="nome" type="text" id="nome"></td> 
            </tr> 
            <tr> 
              <td width="88" height="5" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
              <td width="232" height="5" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
            </tr> 

            <tr> 
              <td width="88" align="right"><span class="Stile14">Via</span></td> 
              <td width="232" align="right"><input name="via" type="text" id="via"></td> 
            </tr> 
            <tr> 
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
            </tr> 
            <tr> 
              <td height="10" align="right" class="Stile14">Numero</td> 
              <td height="10" align="right"><input name="numero" type="text" id="numero"></td> 
            </tr> 
            <tr> 
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
            </tr> 
            <tr> 
              <td height="10" align="right" class="Stile14">CAP</td> 
              <td height="10" align="right"><input name="cap" type="text" id="cap"></td> 
            </tr> 
            <tr> 
            <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
            </tr> 
            <tr> 
              <td width="88" height="10" align="right"><span class="Stile14">Città</span></td> 
              <td width="232" height="10" align="right"><input name="citta" type="text" id="citta"></td> 
            </tr> 
            <tr> 
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
            </tr> 
            <tr> 
              <td height="10" align="right" class="Stile14">Provincia</td> 
              <td height="10" align="right"><input name="provincia" type="text" id="provincia"></td> 
            </tr> 
            <tr> 
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
            </tr> 

            <tr> 
              <td width="88" align="right"><span class="Stile14">Telefono</span></td> 
              <td width="232" align="right"><input name="telfax" type="text" id="telfax"></td> 
            </tr> 
            <tr> 
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
            </tr> 
            <tr> 
              <td height="10" align="right"><span class="Stile14">Fax</span></td> 
              <td height="10" align="right"><input name="telfax2" type="text" id="telfax2"></td> 
            </tr> 
            <tr> 
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
            </tr> 
            <tr> 
              <td height="10" align="right"><span class="Stile14">Cellulare</span></td> 
              <td height="10" align="right"><input name="telfax3" type="text" id="telfax3"></td> 
            </tr> 
            <tr> 
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
            </tr> 

            <tr> 
              <td width="88" align="right"><span class="Stile14">E-mail</span></td> 
              <td width="232" align="right"><input name="email" type="text" id="email"></td> 
            </tr> 
            <tr> 
              <td height="5" colspan="2" align="right"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
            </tr> 
             
            <tr> 
              <td height="10" align="right" class="Stile14">Pagamento: </td> 
              <td height="10" align="right"><table width="232" border="0" cellspacing="0" cellpadding="0"> 
                <tr> 
                  <td align="right"><span class="Stile14">Bonifico</span> 
                  <input name="ctel2" type="radio" value="bonifico"></td> 
                  <td align="right"><span class="Stile14">Vaglia</span> 
                  <input name="ctel2" type="radio" value="vaglia"></td> 
                </tr> 
              </table></td> 
            </tr> 
             
             
            <tr> 
              <td height="10" colspan="2" align="right"><img src="../../../immagini/pixel.gif" width="1" height="1"><img src="../../../immagini/pixel.gif" width="1" height="1"></td> 
            </tr> 

            <tr> 
              <td width="88" align="right" valign="top" class="Stile14">Note</td> 
              <td width="232" align="right"><textarea name="richieste" rows="8" wrap="VIRTUAL" id="richieste"></textarea></td> 
            </tr> 
            <tr> 
              <td width="88" height="10" align="right"><img src="../../../immagini/pixel.gif" width="1" height="1"></td> 
              <td width="232" height="10" align="right"><img src="../../../immagini/pixel.gif" width="1" height="1"></td> 
            </tr> 
            <tr> 
              <td colspan="2" align="center" valign="top" class="Stile14"><iframe frameborder="0" id="content" name="content" src="informativa.html" width="300 
    " height="300" ></iframe></td> 
            </tr> 
            <tr> 
              <td align="right" class="Stile14">Acconsento al trattamento dei dati</td> 
              <td align="right"><table width="232" border="0" cellspacing="0" cellpadding="0"> 
                <tr> 
                  <td align="right"><span class="Stile14">Si </span> 
                      <input type="checkbox" name="ctel3" value="1" /></td> 
                  <td align="right">&nbsp;</td> 
                </tr> 
              </table></td> 
            </tr> 
            <tr> 
              <td align="right">&nbsp;</td> 
              <td align="right">&nbsp;</td> 
            </tr> 
            <tr> 
              <td width="88" align="right">&nbsp;</td> 
              <td width="232" align="right"><input name="Submit" type="submit" value="Invia richiesta"></td>
            </tr> 
            <tr> 
              <td align="right">&nbsp;</td> 
              <td height="10" align="right"><input name="Submit2" type="reset" value="Annulla"></td> 
            </tr> 
            <tr> 
              <td width="88" align="right">&nbsp;</td> 
              <td width="232" height="10" align="right"><img src="../../../immagini/pixel.gif" width="1" height="1"></td> 
            </tr> 
          </table> 
      </form> 
      <?php 
}else if($passo=='1'){ 
	if($_P0ST['ctel3'] != 1)
	{
		// QUI VISUALIZZA IL MESSAGGIO DI ERRORE
	}
	else
	{
		$destinatario  = "<" . $_REQUEST["email"] . ">"; 
		$oggetto = "oggetto"; 
		$corpodelmessaggio = ' 
		<html> 
		<head> 
		 <title>Titolo</title> 
		</head> 
		<body> 
		<p>Grazie per aver scelto il nostro sito </p> 
		<p>Le sue richieste saranno esaudite al pi&ugrave; presto</p> 
		<p>Nome</p> 
		</body> 
		</html> 
		'; 
		$headers = "From: [email protected]\r\n"; 
		$headers .= "MIME-Version: 1.0\r\n"; 
		//unique boundary 
		$boundary = uniqid("inviodati"); 
		//tell e-mail client this e-mail contains//alternate versions 
		$headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n"; 
		//HTML version of message 
		$body .= "--$boundary\r\n" . 
		   "Content-Type: text/html; charset=ISO-8859-1\r\n" . 
		   "Content-Transfer-Encoding: base64\r\n\r\n"; 
		$body .= chunk_split(base64_encode($corpodelmessaggio)); 
		//send message 
		mail($destinatario, $oggetto, $body, $headers); 
	//seconda mail 
		$oggetto = "Richiesta informazioni dal sito"; 
		$corpodelmessaggio = ' 
		<html> 
		<head> 
		 <title>Titolo</title> 
		</head> 
		<body> 
		<p>Nome e cognome: ' . $_REQUEST["nome"] . '</p> 
		<p>via: ' . $_REQUEST["via"] . '</p> 
		<p>numero: ' . $_REQUEST["numero"] . '</p> 
		<p>cap: ' . $_REQUEST["cap"] . '</p> 
		<p>città: ' . $_REQUEST["citta"] . '</p> 
		<p>provincia: ' . $_REQUEST["provincia"] . '</p> 
		<p>Telefono: ' . $_REQUEST["telfax"] . '</p> 
		<p>Fax: ' . $_REQUEST["telfax2"] . '</p> 
		<p>Cellulare: ' . $_REQUEST["telfax3"] . '</p> 
		<p>E-mail: ' . $_REQUEST["email"] . '</p> 
		<p>tipo pagamento: ' . $_REQUEST["ctel2"] . '</p> 
		<p>Acconsento al trattamento dei dati: ' . $_REQUEST["ctel3"] . '</p> 
		<p>note: ' . $_REQUEST["richieste"] . '</p> 
		 
		</body> 
		</html> 
		'; 
		$headers = "From: [email protected]\r\n"; 
		$headers .= "MIME-Version: 1.0\r\n"; 
		//unique boundary 
		$boundary = uniqid("inviodati"); 
		//tell e-mail client this e-mail contains//alternate versions 
		$headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n"; 
		//HTML version of message 
		$body .= "--$boundary\r\n" . 
		   "Content-Type: text/html; charset=ISO-8859-1\r\n" . 
		   "Content-Transfer-Encoding: base64\r\n\r\n"; 
		$body .= chunk_split(base64_encode($corpodelmessaggio)); 
		//send message 
		mail("[email protected]", $oggetto, $body, $headers); 
	}
?> 
        <table width="280" border="0" align="center" cellpadding="0" cellspacing="0"> 
          <tr> 
            <td><div align="center" class="titolo Stile2"><strong>Riepilogo  
            informazioni inviate</strong><br> 
            </div></td> 
          </tr> 
          <tr> 
            <td height="20">&nbsp;</td> 
          </tr> 
          <tr> 
            <td><span class="Stile1 Stile11">Nome e cognome: </span> <span class="testo"><?php echo($_REQUEST["nome"]) ?></span></td> 
          </tr> 
          <tr> 
            <td height="10"><img src="../../../immagini/pixel.gif" width="1" height="1"></td> 
          </tr> 
          <tr> 
            <td><span class="Stile16">Via: </span> <span class="testo"><?php echo($_REQUEST["via"]) ?></span></td> 
          </tr> 
          <tr> 
            <td height="10"><img src="../../../immagini/pixel.gif" width="1" height="1"></td> 
          </tr> 
          <tr> 
            <td><span class="Stile16">Citt&agrave;: </span> <span class="testo"><?php echo($_REQUEST["citta"]) ?></span></td> 
          </tr> 

          <tr> 
            <td height="10"><img src="../../../immagini/pixel.gif" width="1" height="1"></td> 
          </tr> 
          <tr> 
            <td><span class="Stile16">Telefono: </span> <span class="testo"><?php echo($_REQUEST["telfax"]) ?></span></td> 
          </tr> 
          <tr> 
            <td height="10"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
          </tr> 
          <tr> 
            <td height="10"><span class="Stile16">Fax: </span> <span class="testo"><?php echo($_REQUEST["telfax2"]) ?></span></td> 
          </tr> 
          <tr> 
            <td height="10"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
          </tr> 
          <tr> 
            <td height="10"><span class="Stile16">Cellulare: </span> <span class="testo"><?php echo($_REQUEST["telfax3"]) ?></span></td> 
          </tr> 
          <tr> 
            <td height="10"><img src="../../../immagini/pixel.gif" width="1" height="1"></td> 
          </tr> 
          <tr> 
            <td><span class="Stile16">E-mail: </span> <span class="testo"><?php echo($_REQUEST["email"]) ?></span></td> 
          </tr> 
           
           
          <tr> 
            <td height="10"><img src="../../../immagini/pixel.gif" width="1" height="1"></td> 
          </tr> 
          <tr> 
            <td><span class="Stile16">Note: </span> <span class="testo"><?php echo($_REQUEST["richieste"]) ?></span></td> 
          </tr> 
          <tr> 
            <td height="10"><img src="../immagini/e_commerce/pixel.gif" width="1" height="1"></td> 
          </tr> 
          <tr> 
            <td><span class="Stile16"><strong>Acconsento al trattamento dei dati</strong>:<span class="testo"><?php echo($_REQUEST["ctel3"]) ?></span></span></td> 
          </tr> 
        </table> 
    <?php 
} 
?>    </td> 
  </tr> 
  <tr> 
    <td>&nbsp;</td> 
  </tr> 
</table> 

</body> 
</html>
 

muppa

Nuovo Utente
26 Ott 2010
9
0
0
Ho provato, ma non funge. Prosegue sia che spunto l'informativa sia che non la spunto e non invia le mail.
 

alessandro1997

Utente Attivo
6 Ott 2009
5.302
1
0
26
Roma
alessandro1997.netsons.org
Il tuo script è piuttosto confuso. Non sono d'accordo con l'idea di inserire tutto nella stessa pagina. Io avrei messo ogni form in una pagina separata, e poi li avrei inclusi. Comunque, puoi farmi vedere come lo hai modificato? O è uguale a quello che ti ho postato?
 

muppa

Nuovo Utente
26 Ott 2010
9
0
0
ciao, sempre grazie per la disponibilità
Io ho usato il codice postato (chiaramente cambiando gli indirizzi di mail).
In sostanza io non ho scritto niente. Sono parti che ho assemblato insieme, in maniera meccanica.
Io sono prevalentemente un grafico.
 
Discussioni simili
Autore Titolo Forum Risposte Data
R Obbligare all'utente un pagamento al momento della registrazione PHP 3
giancadeejay Obbligare l'utente a ruotare il dispositivo PHP PHP 0
ivarello Obbligare Utenti a vedere filmato Javascript 2
I nome utente non esiste nel database PHP 1
I carica foto profilo sessione utente PHP 2
I sessione utente elimina chat PHP 12
I invia inserisci nome utente invia messaggio PHP 0
I cartella privata utente PHP 4
I caricamento file in sottocartella nome utente PHP 3
felino [Wordpress] Gallery con foto selezionabili dall'utente WordPress 0
M Mostrare testo (o parte di esso) in base a utente PHP 0
G Bentrovati da un nuovo utente Presentati al Forum 1
C Rinominare file in base all'id dell'utente loggato PHP 0
E Gestione profilo utente tramite Form PHP 3
I visualizza profilo utente utente in chat PHP 0
F Nuovo utente Presentati al Forum 0
R Plugin per Registrazione Utente e Pagamento prodotto WordPress 2
A Dare l'accesso ad una pagina solo ad un utente specifico PHP 0
G Registrazione utente su pagina asp Classic ASP 14
M Lanciare alert se il codice fiscale è già presente nel db e lasciare la scelta di inserire all'utente PHP 42
W Nuovo utente Presentati al Forum 0
J Nuovo utente Presentati al Forum 1
G Nuovo utente Presentati al Forum 1
F [PHP] Verifica utente presente nel DB PHP 13
A [PHP] Bloccare utente tramite indirizzo IP PHP 3
A [PHP] registrazione utente in un database sql con confronto PHP 1
R [WordPress] Calendario Personale per ogni Utente WordPress 0
R [PHP] Estrarre id utente loggato.? PHP 4
KOMODO_JOE [WordPress] Area privata per ogni utente su altervista WordPress 1
L Nuovo utente Presentati al Forum 0
L [PHP] Visualizzare utente dopo login PHP 0
M Nuovo Utente Presentati al Forum 0
Robpagna Nuovo utente Presentati al Forum 2
U [PHP] Differenza tra amministratore e utente PHP 2
svtmaster Salve , un saluto a tutti voi sono un nuovo utente . Grazie Presentati al Forum 0
G Sono un nuovo utente questo sito Presentati al Forum 0
R [PHP] creare pagina profilo per ogni utente PHP 4
M [PHP] Eliminazione utente e tutti i suoi file caricati in una cartella PHP 8
A [PHP] Controllo nome utente form di registrazione PHP 4
M [MySQL] Come associare stats ad ogni utente. MySQL 0
joomeph Cambiare Nome Utente Supporto Mr.Webmaster 3
A [PHP] Cancellare riga database a scelta dell'utente PHP 2
A [PHP] Modificare campo database in base alla scelta dell'utente PHP 2
A Cambio password utente DB Database 0
J [PHP] Estrapolare utente dominio da pc PHP 2
B [PHP] hp script creare un utente diminuendo -1 e cosi via PHP 1
P [PHP] Limitare login ad un solo utente per volta PHP 12
A Un saluto da un nuovo utente Presentati al Forum 2
giancadeejay [PHP] Pagina profilo UTENTE modificabile PHP 2
D [Javascript] [HTML] Countdown su Mobirise di 24 ore relative per ogni utente. Javascript 4

Discussioni simili