<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[php - Invio mail form]]></title><description><![CDATA[<p dir="auto">Salve vado subito al dunque.. perche sto impazzendo.. non ne capisco molto di php.. cmq. ho creato un form per inviare email. il form funziona pero la variante che ho messo ora e che la risposta del submit deve avvenire nella stessa pagina.. senz ricaricare. funziona in parte i problema è che rimane bloccato il messaggio email inviata.. ogni qual volta ricarico la pagina.. mi rinvia il modulo non calcolando il submit. aiutatemi questo è il codice.</p>
<p dir="auto"><a href="http://casebioedilizia.com/schede" rel="nofollow ugc">casebioedilizia.com/schede</a> arredo.html</p>
<p dir="auto">qui il codice.</p>
<pre><code class="language-html">&lt;?php
 // L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
 $to = "&lt;mail&gt;";
 
 // IL SOGGETTO DELLA MAIL
 $subject = "RICHIESTA PRODOTTO - TECNOWOODSHOP.IT";
 
 // COSTRUZIONE DEL CORPO DEL MESSAGGIO
 $body = "Contenuto del modulo:\n\n";
 
 $body .= "Dati personali ;\nCognome: " . trim(stripslashes($_POST["cognome"])) . "\n";
 $body .= "Nome: " . trim(stripslashes($_POST["nome"])) . "\n";
 $body .= "Indirizzo: " . trim(stripslashes($_POST["indirizzo"])) . "\n";
 $body .= "Tel: " . trim(stripslashes($_POST["tel"])) . "\n";
 $body .= "Mail: " . trim(stripslashes($_POST["mail"])) . "\n";
 $body .= "Prodotto: " . trim(stripslashes($_POST["prodotto"])) . "\n";
 $body .= "Ricevere Newsletter?: " . trim(stripslashes($_POST["new"])) . "\n\n";

 
 // INTESTAZIONI SUPPLEMENTARI
 $headers = "From: Modulo utenti &lt;INDIRIZZO-COME-SOPRA&gt;";
 
 // INVIO DELLA MAIL
 if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...
 
 echo "MAIL INOLTRATA.";
 
 }  else {// ALTRIMENTI...
 
 echo "ERRORE MAIL.";
 
 }
 

 
 ?&gt;



&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;CONTATTACI&lt;/title&gt;
&lt;link rel="icon" href="img/ico.png" type="image/png"&gt;
&lt;link href="css.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;

&lt;body style="margin:0; color: #fff; font-size:10px;"&gt;
&lt;form name="form1" method="post" action="&lt;?php echo ($_SERVER["PHP_SELF"]); ?&gt;"&gt;
&lt;table width="160" border="0" cellspacing="3" cellpadding="0"&gt;
  &lt;tr&gt;
    &lt;td width="55" height="25" align="right" style="padding-right: 5px; color:#fff; font-size:11px"&gt;Nome: &lt;/td&gt;
    &lt;td height="25" align="right" style="padding-right: 5px;"&gt;&lt;input name="nome" type="text" size="10" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" align="right" style="padding-right: 5px; color:#fff; font-size:11px"&gt;Cognome:&lt;/td&gt;
    &lt;td align="right" style="padding-right: 5px;"&gt;&lt;input name="cognome" type="text" size="10" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" align="right" style="padding-right: 5px; color:#fff; font-size:11px"&gt;Indirizzo:&lt;/td&gt;
    &lt;td align="right" style="padding-right: 5px;"&gt;&lt;input name="indirizzo" type="text" size="10" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" align="right" style="padding-right: 5px; color:#fff; font-size:11px"&gt;Tel:&lt;/td&gt;
    &lt;td align="right" style="padding-right: 5px;"&gt;&lt;input name="tel" type="text" size="10" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" align="right" style="padding-right: 5px; color:#fff; font-size:11px"&gt;Email:&lt;/td&gt;
    &lt;td align="right" style="padding-right: 5px;"&gt;&lt;input name="mail" type="text" size="10" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" colspan="2" align="right" style="padding-right: 5px;"&gt;&lt;select name="prodotto" style="width: 140px; font-size:11px"&gt;
      &lt;option&gt;Seleziona il prodotto&lt;/option&gt;
      &lt;option value="Armadio 2 ante con casetti - Noce / H 186"&gt;Noce / H 186&lt;/option&gt;
      &lt;option value="Armadio 2 ante con casetti - Noce / H 224"&gt;Noce / H 224&lt;/option&gt;
      &lt;option value="Armadio 2 ante con casetti - Bianco / H 186"&gt;Bianco / H 186&lt;/option&gt;
      
    &lt;/select&gt;    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" colspan="2" align="center"  style="padding-right: 5px; color:#fff; font-size:11px"&gt;&lt;input style=" border-color:#EAEAEA" type="checkbox" name="new" value="Si"/&gt;
      Ricevere News-letter&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" colspan="2" align="center" valign="bottom"&gt;&lt;input type="submit" name="submit" value="INVIA" style="bacbackground-attachment: scroll;
background-clip: border-box;
background-color: #fff;
border-color: #404040;
border-style: solid;
border-width: 1px;
color: #202020;
text-align: center;
width: 70px; 
height: 18px; 
font-size:10px;" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
&lt;/form&gt;



&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p dir="auto">grazie anticipatamente.. so che trovere la soluzione.</p>
]]></description><link>https://dev.connect.gt/topic/151706/php-invio-mail-form</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 09:29:39 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/151706.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 17 May 2011 16:26:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 15:49:52 GMT]]></title><description><![CDATA[<p dir="auto">Se ho ben capito cosa vuoi, dovresti mettere die invece di echo:</p>
<pre><code class="language-php"> // INVIO DELLA MAIL
 if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...
 
 die("&lt;div style=\"text-align:center;width:160px;color:#00ff00;margin:0\" align=\"center\"&gt;&lt;b&gt;"."MAIL INOLTRATA."."&lt;/b&gt;&lt;/div&gt;");
 
 } 
 
   else {// ALTRIMENTI...
 
 die("&lt;div style=\"text-align:center;width:160px;color:red;margin:0\" align=\"center\"&gt;&lt;b&gt;"."ERRORE MAIL."."&lt;/b&gt;&lt;/div&gt;");
 
 }
</code></pre>
]]></description><link>https://dev.connect.gt/post/1005358</link><guid isPermaLink="true">https://dev.connect.gt/post/1005358</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 18 May 2011 15:49:52 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 15:38:46 GMT]]></title><description><![CDATA[<p dir="auto">E nel caso in cui volessi che il messaggio mail inviata o errore mail.. comparisse come per l'errore del campo vuoto.. ovvero con il form che scompare come devo fare.. qui il codice di quel punto.</p>
<pre><code class="language-php"> // INVIO DELLA MAIL
 if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...
 
  echo "&lt;div style=\"text-align:center;width:160px;color:#00ff00;margin:0\" align=\"center\"&gt;&lt;b&gt;"."MAIL INOLTRATA."."&lt;/b&gt;&lt;/div&gt;";
 
 } 
 
   else {// ALTRIMENTI...
 
 echo "&lt;div style=\"text-align:center;width:160px;color:red;margin:0\" align=\"center\"&gt;&lt;b&gt;"."ERRORE MAIL."."&lt;/b&gt;&lt;/div&gt;";
 
 }
</code></pre>
]]></description><link>https://dev.connect.gt/post/1005369</link><guid isPermaLink="true">https://dev.connect.gt/post/1005369</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Wed, 18 May 2011 15:38:46 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 15:16:36 GMT]]></title><description><![CDATA[<p dir="auto">La soluzione più veloce è questa:</p>
<pre><code class="language-php">if(!isset($_POST["nome"]) || $_POST["nome"] == '')
{
$err = true;
echo 'Nome mancante&lt;br&gt;';
}
if(!isset($_POST["cognome"]) || $_POST["cognome"] == '')
{
$err = true;
echo 'Cognome mancante&lt;br&gt;';
}
if(!isset($_POST["indirizzo"]) || $_POST["indirizzo"] == '')
{
$err = true;
echo 'Indirizzo mancante&lt;br&gt;';
}    
if(!isset($_POST["tel"]) || $_POST["tel"] == '')
{
$err = true;
echo 'Tel mancante&lt;br&gt;'; 
}
if(!isset($_POST["mail"]) || $_POST["mail"] == '')
{
$err = true;
echo 'Mail mancante&lt;br&gt;';
}
if(!isset($_POST["prodotto"]) || $_POST["prodotto"] == '')
{
$err = true;
echo 'Seleziona il Prodotto&lt;br&gt;';   
}
if(isset($err))
    die('&lt;a href="javascript:history.back()"&gt;Torna indietro&lt;/a&gt;');
</code></pre>
]]></description><link>https://dev.connect.gt/post/1005357</link><guid isPermaLink="true">https://dev.connect.gt/post/1005357</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 18 May 2011 15:16:36 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 15:14:19 GMT]]></title><description><![CDATA[<p dir="auto">Scusami ancora.. Una cosa che ho visto e che quando non compili un campo.. non ti è possibile tornare indietro per compilare quel campo mancante.. o.o come si può fare?</p>
]]></description><link>https://dev.connect.gt/post/1005368</link><guid isPermaLink="true">https://dev.connect.gt/post/1005368</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Wed, 18 May 2011 15:14:19 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:40:02 GMT]]></title><description><![CDATA[<p dir="auto">Basta studiare, e tanta pratica... E chiunque può imparare.</p>
]]></description><link>https://dev.connect.gt/post/1005355</link><guid isPermaLink="true">https://dev.connect.gt/post/1005355</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 18 May 2011 14:40:02 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:38:04 GMT]]></title><description><![CDATA[<p dir="auto">:DDD Grazie mille...  Vorrei averle io le tue conoscenze <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--disappointed" style="height:1.4em;width:auto;vertical-align:middle" title=":(" alt="😞" /></p>
]]></description><link>https://dev.connect.gt/post/1005367</link><guid isPermaLink="true">https://dev.connect.gt/post/1005367</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Wed, 18 May 2011 14:38:04 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:36:33 GMT]]></title><description><![CDATA[<p dir="auto">Se invece di:</p>
<pre><code>&lt;option&gt;Seleziona il prodotto&lt;/option&gt;
</code></pre>
<p dir="auto">Metti:</p>
<pre><code>&lt;option value=""&gt;Seleziona il prodotto&lt;/option&gt;
</code></pre>
<p dir="auto">Funziona sicuramente.</p>
]]></description><link>https://dev.connect.gt/post/1005354</link><guid isPermaLink="true">https://dev.connect.gt/post/1005354</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 18 May 2011 14:36:33 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:34:20 GMT]]></title><description><![CDATA[<p dir="auto">Comunque vedi che il "$_POST["prodotto"]" è un menu a tendina.. Quindi non so come si deve procedere per questo? Penso che sia in ogni caso selezionato il menu a tendina.. Ma se io voglio che devi selezionare una voce differente da "Seleziona prodotto" per procedere come deve essere sto codice?? Comunque questa è l'ultima cosa che ti chiedo.. Prometto che non ti stresso più..</p>
]]></description><link>https://dev.connect.gt/post/1005366</link><guid isPermaLink="true">https://dev.connect.gt/post/1005366</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Wed, 18 May 2011 14:34:20 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:30:59 GMT]]></title><description><![CDATA[<p dir="auto">Ti ho già scritto il codice esatto veramente...<br />
Forse non hai visto la seconda pagina della discussione.</p>
]]></description><link>https://dev.connect.gt/post/1005351</link><guid isPermaLink="true">https://dev.connect.gt/post/1005351</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 18 May 2011 14:30:59 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:29:12 GMT]]></title><description><![CDATA[<p dir="auto">Grazie <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://dev.connect.gt/post/1005364</link><guid isPermaLink="true">https://dev.connect.gt/post/1005364</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Wed, 18 May 2011 14:29:12 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:22:54 GMT]]></title><description><![CDATA[<pre><code class="language-php">if(!isset($_POST["nome"]) || $_POST["nome"] == '')
{
$err = true;
echo 'Nome mancante&lt;br&gt;';
}
if(!isset($_POST["cognome"]) || $_POST["cognome"] == '')
{
$err = true;
echo 'Cognome mancante&lt;br&gt;';
}
if(!isset($_POST["indirizzo"]) || $_POST["indirizzo"] == '')
{
$err = true;
echo 'Indirizzo mancante&lt;br&gt;';
}    
if(!isset($_POST["tel"]) || $_POST["tel"] == '')
{
$err = true;
echo 'Tel mancante&lt;br&gt;'; 
}
if(!isset($_POST["mail"]) || $_POST["mail"] == '')
{
$err = true;
echo 'Mail mancante&lt;br&gt;';
}
if(!isset($_POST["prodotto"]) || $_POST["prodotto"] == '')
{
$err = true;
echo 'Seleziona il Prodotto&lt;br&gt;';   
}
if(isset($err))
    die;
</code></pre>
]]></description><link>https://dev.connect.gt/post/1005352</link><guid isPermaLink="true">https://dev.connect.gt/post/1005352</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 18 May 2011 14:22:54 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:18:01 GMT]]></title><description><![CDATA[<p dir="auto">EeehhHHh!1 No scusami ho capito ben poco.. Siccome dovrei fare solo quest'ultima cosa.. ti chiedo umilmente se mi puoi aiutare.. Per quanto riguarda il php me lo devo insegnare.. ma per ora non ho tempo..</p>
]]></description><link>https://dev.connect.gt/post/1005363</link><guid isPermaLink="true">https://dev.connect.gt/post/1005363</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Wed, 18 May 2011 14:18:01 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:16:09 GMT]]></title><description><![CDATA[<p dir="auto">Invece di usare die sarebbe da usare echo e inserire una variabile flag per non inviare l'email in caso di errori, ma dovresti comunque studiare le basi di php.</p>
]]></description><link>https://dev.connect.gt/post/1005350</link><guid isPermaLink="true">https://dev.connect.gt/post/1005350</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 18 May 2011 14:16:09 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:13:07 GMT]]></title><description><![CDATA[<pre><code class="language-php">if(isset($_POST['submit']))
{
    
    if(!isset($_POST["nome"]) || $_POST["nome"] == '')
die('Nome mancante'); 
if(!isset($_POST["cognome"]) || $_POST["cognome"] == '')
die('Cognome mancante'); 
if(!isset($_POST["indirizzo"]) || $_POST["indirizzo"] == '')
die('Indirizzo mancante');    
if(!isset($_POST["tel"]) || $_POST["tel"] == '')
die('Tel mancante');  
if(!isset($_POST["mail"]) || $_POST["mail"] == '')
die('Mail mancante');
if(!isset($_POST["prodotto"]) || $_POST["prodotto"] == '')
die('Seleziona il Prodotto');    

    
    
    
 // L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
 $to = "infotecnowood@gmail.com";
 
 // IL SOGGETTO DELLA MAIL
 $subject = "RICHIESTA PRODOTTO - TECNOWOODSHOP.IT";
 
 // COSTRUZIONE DEL CORPO DEL MESSAGGIO
 $body = "Contenuto del modulo:\n\n";
 
 $body .= "Dati personali ;\nCognome: " . trim(stripslashes($_POST["cognome"])) . "\n";
 $body .= "Nome: " . trim(stripslashes($_POST["nome"])) . "\n";
 $body .= "Indirizzo: " . trim(stripslashes($_POST["indirizzo"])) . "\n";
 $body .= "Tel: " . trim(stripslashes($_POST["tel"])) . "\n";
 $body .= "Mail: " . trim(stripslashes($_POST["mail"])) . "\n";
 $body .= "Prodotto: " . trim(stripslashes($_POST["prodotto"])) . "\n";
 $body .= "Ricevere Newsletter?: " . trim(stripslashes($_POST["new"])) . "\n\n";

 
 // INTESTAZIONI SUPPLEMENTARI
 $headers = "From: Modulo utenti &lt;INDIRIZZO-COME-SOPRA&gt;";
 
 // INVIO DELLA MAIL
 if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...
 
  echo "&lt;div style=\"text-align:center;width:160px;color:#00ff00\" align=\"center\"&gt;&lt;b&gt;"."MAIL INOLTRATA."."&lt;/b&gt;&lt;/div&gt;";
 
 } 
 
   else {// ALTRIMENTI...
 
 echo "&lt;div style=\"text-align:center;width:160px;color:red\" align=\"center\"&gt;&lt;b&gt;"."ERRORE MAIL."."&lt;/b&gt;&lt;/div&gt;";
 
 }
 
 
 }

 
 ?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/1005362</link><guid isPermaLink="true">https://dev.connect.gt/post/1005362</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Wed, 18 May 2011 14:13:07 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:08:50 GMT]]></title><description><![CDATA[<p dir="auto">Dovresti postare cosa hai fatto.</p>
]]></description><link>https://dev.connect.gt/post/1005348</link><guid isPermaLink="true">https://dev.connect.gt/post/1005348</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 18 May 2011 14:08:50 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:07:41 GMT]]></title><description><![CDATA[<p dir="auto">Ho provato.. ma inserendo questo che mi hai detto tu.. seguito dagli altri cambiando solo la variabile.. mi dice che è vuoto solo il primo campo..<br />
Quindi mi compare il messaggio Nome mancante..<br />
Appena compilo il campo nome mi dice cognome mancante.. mentre invece voglio che mi dice manca questo, questo e quastaltro..</p>
]]></description><link>https://dev.connect.gt/post/1005372</link><guid isPermaLink="true">https://dev.connect.gt/post/1005372</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Wed, 18 May 2011 14:07:41 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 14:00:15 GMT]]></title><description><![CDATA[<pre><code class="language-php">if(!isset($_POST["nome"]) || $_POST["nome"] == '')
die('Nome mancante');
</code></pre>
]]></description><link>https://dev.connect.gt/post/1005345</link><guid isPermaLink="true">https://dev.connect.gt/post/1005345</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 18 May 2011 14:00:15 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 13:58:08 GMT]]></title><description><![CDATA[<p dir="auto">Si Scusami... If del tipo?</p>
]]></description><link>https://dev.connect.gt/post/1005365</link><guid isPermaLink="true">https://dev.connect.gt/post/1005365</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Wed, 18 May 2011 13:58:08 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 13:53:37 GMT]]></title><description><![CDATA[<p dir="auto">Fai attenzione alle maiuscole nei tuoi messaggi...<br />
Per quanto riguarda la domanda, dovresti fare degli if sulle variabili POST prima di utilizzare la funzione mail.</p>
]]></description><link>https://dev.connect.gt/post/1005353</link><guid isPermaLink="true">https://dev.connect.gt/post/1005353</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 18 May 2011 13:53:37 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 13:51:35 GMT]]></title><description><![CDATA[<p dir="auto">Scusami ancora e se invece vorrei fare in modo che se alcuni campi non sono compilati la mail non procede? E ti compare sempre un messaggio di errore?</p>
]]></description><link>https://dev.connect.gt/post/1005361</link><guid isPermaLink="true">https://dev.connect.gt/post/1005361</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Wed, 18 May 2011 13:51:35 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Wed, 18 May 2011 07:54:11 GMT]]></title><description><![CDATA[<p dir="auto">Invece di eseguire sempre quel codice, con un if verifichi che la variabile POST submit sia stata inviata prima di eseguire quella parte di codice.</p>
]]></description><link>https://dev.connect.gt/post/1005349</link><guid isPermaLink="true">https://dev.connect.gt/post/1005349</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 18 May 2011 07:54:11 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Tue, 17 May 2011 17:51:38 GMT]]></title><description><![CDATA[<p dir="auto">Funziona ma mi puoi spiegare cosi capisco e non ci ricado in un errore del genere.. Comunque grazie 1000. <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://dev.connect.gt/post/1005360</link><guid isPermaLink="true">https://dev.connect.gt/post/1005360</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Tue, 17 May 2011 17:51:38 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Tue, 17 May 2011 17:22:51 GMT]]></title><description><![CDATA[<p dir="auto">Prova cosi:</p>
<pre><code class="language-php">&lt;?php
if(isset($_POST['submit']))
{
 // L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
 $to = "&lt;mail&gt;";
 
 // IL SOGGETTO DELLA MAIL
 $subject = "RICHIESTA PRODOTTO - TECNOWOODSHOP.IT";
 
 // COSTRUZIONE DEL CORPO DEL MESSAGGIO
 $body = "Contenuto del modulo:\n\n";
 
 $body .= "Dati personali ;\nCognome: " . trim(stripslashes($_POST["cognome"])) . "\n";
 $body .= "Nome: " . trim(stripslashes($_POST["nome"])) . "\n";
 $body .= "Indirizzo: " . trim(stripslashes($_POST["indirizzo"])) . "\n";
 $body .= "Tel: " . trim(stripslashes($_POST["tel"])) . "\n";
 $body .= "Mail: " . trim(stripslashes($_POST["mail"])) . "\n";
 $body .= "Prodotto: " . trim(stripslashes($_POST["prodotto"])) . "\n";
 $body .= "Ricevere Newsletter?: " . trim(stripslashes($_POST["new"])) . "\n\n";

 
 // INTESTAZIONI SUPPLEMENTARI
 $headers = "From: Modulo utenti &lt;INDIRIZZO-COME-SOPRA&gt;";
 
 // INVIO DELLA MAIL
 if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...
 
  echo "MAIL INOLTRATA.";
 
 }  else {// ALTRIMENTI...
 
 echo "ERRORE MAIL.";
 
 }
 }

 
 ?&gt;



&lt;html&gt;
&lt;head&gt;
&lt;meta  http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;CONTATTACI&lt;/title&gt;
&lt;link rel="icon" href="img/ico.png" type="image/png"&gt;
&lt;link href="css.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;

&lt;body style="margin:0; color: #fff;  font-size:10px;"&gt;
&lt;form name="form1" method="post" action="&lt;?php echo ($_SERVER["PHP_SELF"]); ?&gt;"&gt;
&lt;table width="160" border="0" cellspacing="3" cellpadding="0"&gt;
  &lt;tr&gt;
    &lt;td width="55" height="25" align="right" style="padding-right: 5px; color:#fff; font-size:11px"&gt;Nome: &lt;/td&gt;
    &lt;td height="25" align="right" style="padding-right: 5px;"&gt;&lt;input name="nome" type="text" size="10" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" align="right" style="padding-right: 5px; color:#fff; font-size:11px"&gt;Cognome:&lt;/td&gt;
    &lt;td align="right" style="padding-right: 5px;"&gt;&lt;input name="cognome" type="text" size="10" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" align="right" style="padding-right: 5px; color:#fff; font-size:11px"&gt;Indirizzo:&lt;/td&gt;
    &lt;td align="right" style="padding-right: 5px;"&gt;&lt;input name="indirizzo" type="text" size="10" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" align="right" style="padding-right: 5px; color:#fff; font-size:11px"&gt;Tel:&lt;/td&gt;
    &lt;td align="right" style="padding-right: 5px;"&gt;&lt;input name="tel" type="text" size="10" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" align="right" style="padding-right: 5px; color:#fff; font-size:11px"&gt;Email:&lt;/td&gt;
    &lt;td align="right" style="padding-right: 5px;"&gt;&lt;input name="mail" type="text" size="10" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" colspan="2" align="right" style="padding-right: 5px;"&gt;&lt;select name="prodotto" style="width: 140px; font-size:11px"&gt;
      &lt;option&gt;Seleziona il prodotto&lt;/option&gt;
      &lt;option value="Armadio 2 ante con casetti - Noce / H 186"&gt;Noce / H 186&lt;/option&gt;
      &lt;option value="Armadio 2 ante con casetti - Noce / H 224"&gt;Noce / H 224&lt;/option&gt;
      &lt;option value="Armadio 2 ante con casetti - Bianco / H 186"&gt;Bianco / H 186&lt;/option&gt;
      
    &lt;/select&gt;    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" colspan="2" align="center"  style="padding-right: 5px; color:#fff; font-size:11px"&gt;&lt;input style=" border-color:#EAEAEA" type="checkbox" name="new" value="Si"/&gt;
      Ricevere News-letter&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td height="25" colspan="2" align="center" valign="bottom"&gt;&lt;input type="submit" name="submit" value="INVIA" style="bacbackground-attachment: scroll;
background-clip: border-box;
background-color: #fff;
border-color: #404040;
border-style: solid;
border-width: 1px;
color: #202020;
text-align: center;
width: 70px; 
height: 18px; 
font-size:10px;" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
&lt;/form&gt;



&lt;/body&gt;
&lt;/html&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/1005344</link><guid isPermaLink="true">https://dev.connect.gt/post/1005344</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Tue, 17 May 2011 17:22:51 GMT</pubDate></item><item><title><![CDATA[Reply to php - Invio mail form on Tue, 17 May 2011 17:19:52 GMT]]></title><description><![CDATA[<p dir="auto">Mi dovrebbe comparire il messaggio dopo che ho compilato il modulo e premuto il bottone invia.. Ma il messaggio compare prima ancora di compilare il modulo.. Invece io voglio che uno compila il modulo.. E una volta che premi invio il form scompare.. E comparira il messaggio con l'esito della mail.. Ovvero se è stata inviata correttamente o no.</p>
]]></description><link>https://dev.connect.gt/post/1005359</link><guid isPermaLink="true">https://dev.connect.gt/post/1005359</guid><dc:creator><![CDATA[painless]]></dc:creator><pubDate>Tue, 17 May 2011 17:19:52 GMT</pubDate></item></channel></rss>