<?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[problema form php]]></title><description><![CDATA[<p dir="auto">ciao a tutti ragazzi ho un problema con questo form nella parte del php mi spiego meglio:</p>
<pre><code>[COLOR=#000088]&lt;form[/COLOR][COLOR=#000000] [/COLOR][COLOR=#660066]action[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"riuscito.php"[/COLOR][COLOR=#000000] [/COLOR][COLOR=#660066]method[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"POST"[/COLOR][COLOR=#000000] [/COLOR][COLOR=#660066]content_type[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"multipart/alternative"[/COLOR][COLOR=#000000] [/COLOR][COLOR=#660066]enctype[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"multipart/form-data"[/COLOR][COLOR=#000000] [/COLOR][COLOR=#660066]target[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"_blank"[/COLOR][COLOR=#000088]&gt;[/COLOR][COLOR=#000000][/COLOR]
     [COLOR=#000088]&lt;p&gt;&lt;span&gt;[/COLOR]Oggetto[COLOR=#000088]&lt;/span&gt;&lt;input[/COLOR] [COLOR=#660066]class[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"contact"[/COLOR] [COLOR=#660066]type[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"text"[/COLOR] [COLOR=#660066]name[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"oggetto"[/COLOR] [COLOR=#660066]value[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]""[/COLOR] [COLOR=#000088]/&gt;&lt;/p&gt;[/COLOR]            [COLOR=#000088]&lt;p&gt;&lt;span&gt;[/COLOR]E-mail[COLOR=#000088]&lt;/span&gt;&lt;input[/COLOR] [COLOR=#660066]class[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"contact"[/COLOR] [COLOR=#660066]type[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"text"[/COLOR] [COLOR=#660066]name[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"email"[/COLOR] [COLOR=#660066]value[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]""[/COLOR] [COLOR=#000088]/&gt;&lt;/p&gt;[/COLOR]            [COLOR=#000088]&lt;p&gt;&lt;span&gt;[/COLOR]Messaggio[COLOR=#000088]&lt;/span&gt;&lt;textarea[/COLOR] [COLOR=#660066]class[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"contact textarea"[/COLOR] [COLOR=#660066]rows[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"8"[/COLOR] [COLOR=#660066]cols[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"50"[/COLOR] [COLOR=#660066]name[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"messaggio"[/COLOR][COLOR=#000088]&gt;&lt;/textarea&gt;&lt;/p&gt;[/COLOR]            [COLOR=#000088]&lt;p&gt;&lt;img[/COLOR] [COLOR=#660066]src[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"captcha.php"[/COLOR] [COLOR=#000088]/&gt;&lt;br/&gt;&lt;br/&gt;[/COLOR]    Inserisci il codice che vedi: [COLOR=#000088]&lt;input[/COLOR] [COLOR=#660066]type[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"text"[/COLOR] [COLOR=#660066]name[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"cpt"[/COLOR] [COLOR=#000088]/&gt;[/COLOR]                        [COLOR=#000088]&lt;p[/COLOR] [COLOR=#660066]style[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"[/COLOR]padding[COLOR=#666600]-[/COLOR]top[COLOR=#666600]:[/COLOR] [COLOR=#006666]15px[/COLOR][COLOR=#008800]"[/COLOR][COLOR=#000088]&gt;&lt;span&gt;[/COLOR]&amp;nbsp;[COLOR=#000088]&lt;/span&gt;[/COLOR] [COLOR=#000088]&lt;input[/COLOR][COLOR=#000000] [/COLOR][COLOR=#660066]class[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"submit"[/COLOR][COLOR=#000000] [/COLOR][COLOR=#660066]type[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"submit"[/COLOR][COLOR=#000000] [/COLOR][COLOR=#660066]name[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"submit"[/COLOR][COLOR=#000000] [/COLOR][COLOR=#660066]value[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"Invia"[/COLOR][COLOR=#000000] [/COLOR][COLOR=#000088]/&gt;&lt;/p&gt;[/COLOR][COLOR=#000000]                       [/COLOR][COLOR=#000088]&lt;/form&gt;[/COLOR]
</code></pre>
<p dir="auto">codice php:</p>
<pre><code>[COLOR=#666600]&lt;?[/COLOR][COLOR=#000000]php [/COLOR]
[COLOR=#000088]if[/COLOR] [COLOR=#666600]([/COLOR]isset[COLOR=#666600]([/COLOR]$_POST[COLOR=#666600][[/COLOR][COLOR=#008800]'submit'[/COLOR][COLOR=#666600]]))[/COLOR] [COLOR=#666600]{[/COLOR]    $oggetto[COLOR=#666600]=[/COLOR]$_POST[COLOR=#666600][[/COLOR][COLOR=#008800]'oggetto'[/COLOR][COLOR=#666600]];[/COLOR]    $email[COLOR=#666600]=[/COLOR]$_POST[COLOR=#666600][[/COLOR][COLOR=#008800]'email'[/COLOR][COLOR=#666600]];[/COLOR]    $messaggio[COLOR=#666600]=[/COLOR]$_POST[COLOR=#666600][[/COLOR][COLOR=#008800]'messaggio'[/COLOR][COLOR=#666600]];[/COLOR]    [COLOR=#000088]if[/COLOR] [COLOR=#666600](![/COLOR]empty[COLOR=#666600]([/COLOR]$oggetto[COLOR=#666600]))[/COLOR] [COLOR=#666600]{[/COLOR]        [COLOR=#000088]if[/COLOR] [COLOR=#666600](![/COLOR]empty[COLOR=#666600]([/COLOR]$email[COLOR=#666600]))[/COLOR] [COLOR=#666600]{[/COLOR]            [COLOR=#000088]if[/COLOR] [COLOR=#666600](![/COLOR]filter_var[COLOR=#666600]([/COLOR]$email[COLOR=#666600],[/COLOR] FILTER_VALIDATE_EMAIL[COLOR=#666600]))[/COLOR] [COLOR=#666600]{[/COLOR]                [COLOR=#000088]if[/COLOR] [COLOR=#666600](![/COLOR]empty[COLOR=#666600]([/COLOR]$messaggio[COLOR=#666600]))[/COLOR] [COLOR=#666600]{[/COLOR]                    [COLOR=#000088]if[/COLOR][COLOR=#666600]([/COLOR]$_SESSION[COLOR=#666600][[/COLOR][COLOR=#008800]"cpt"[/COLOR][COLOR=#666600]]=[/COLOR]$_POST[COLOR=#666600][[/COLOR][COLOR=#008800]"cpt"[/COLOR][COLOR=#666600]])[/COLOR] [COLOR=#666600]{[/COLOR]                            $testo_del_messaggio[COLOR=#666600]=[/COLOR][COLOR=#008800]"Oggetto: $oggetto\n"[/COLOR][COLOR=#666600];[/COLOR]                            $testo_del_messaggio[COLOR=#666600].=[/COLOR][COLOR=#008800]"Email: $email\n"[/COLOR][COLOR=#666600];[/COLOR]                            $testo_del_messaggio[COLOR=#666600].=[/COLOR][COLOR=#008800]"Messaggio: $messaggio\n"[/COLOR][COLOR=#666600];[/COLOR]                            $esito[COLOR=#666600]=[/COLOR]mail[COLOR=#666600]([/COLOR][COLOR=#008800]"esempio@mail.com"[/COLOR][COLOR=#666600],[/COLOR][COLOR=#008800]"Messaggio di $nome ($email)"[/COLOR][COLOR=#666600],[/COLOR] $testo_del_messaggio[COLOR=#666600]);[/COLOR]                            [COLOR=#000088]if[/COLOR] [COLOR=#666600]([/COLOR]$esito[COLOR=#666600])[/COLOR] [COLOR=#666600]{[/COLOR]                                echo [COLOR=#008800]"Esito: Messaggio inviato, ripsonderemo appena possibile!"[/COLOR][COLOR=#666600];[/COLOR]                            [COLOR=#666600]}[/COLOR] [COLOR=#000088]else[/COLOR] [COLOR=#666600]{[/COLOR]                                echo [COLOR=#008800]"Errore: Non &amp;egrave; stato possibile inviare il messaggio!"[/COLOR][COLOR=#666600];[/COLOR]                            [COLOR=#666600]}[/COLOR]                        [COLOR=#666600]}[/COLOR] [COLOR=#000088]else[/COLOR] [COLOR=#666600]{[/COLOR]                        echo [COLOR=#008800]"Errore: Il Codice di verifica non &amp;egrave; corretto!"[/COLOR][COLOR=#666600];[/COLOR]                        [COLOR=#666600]}[/COLOR]                    [COLOR=#666600]}[/COLOR]                [COLOR=#666600]}[/COLOR] [COLOR=#000088]else[/COLOR] [COLOR=#666600]{[/COLOR]                    echo [COLOR=#008800]"Errore: Manca il Messaggio!"[/COLOR][COLOR=#666600];[/COLOR]                [COLOR=#666600]}[/COLOR]            [COLOR=#666600]}[/COLOR] [COLOR=#000088]else[/COLOR] [COLOR=#666600]{[/COLOR]                echo [COLOR=#008800]"Errore: Formato Email non corretto!"[/COLOR][COLOR=#666600];[/COLOR]            [COLOR=#666600]}[/COLOR]        [COLOR=#666600]}[/COLOR] [COLOR=#000088]else[/COLOR] [COLOR=#666600]{[/COLOR]            echo [COLOR=#008800]"Errore: Manca un indirizzo Email!"[/COLOR][COLOR=#666600];[/COLOR]        [COLOR=#666600]}[/COLOR]    [COLOR=#666600]}[/COLOR] [COLOR=#000088]else[/COLOR] [COLOR=#666600]{[/COLOR]        echo [COLOR=#008800]"Errore: Manca l' oggetto!"[/COLOR][COLOR=#666600];[/COLOR]    [COLOR=#666600]}[/COLOR] [COLOR=#000000] [/COLOR][COLOR=#666600]?&gt;[/COLOR]
</code></pre>
<p dir="auto">Praticamente dopo aver compilato tutti i campi mi dà errore manca il messaggio, nonostante sia stato compilato quel modulo, ho provato anche a cambiare if (!empty($messaggio)) in if ($messaggio!= "") o diverso da una variabile vuota ma niente, qual è il problema? Grazie</p>
]]></description><link>https://dev.connect.gt/topic/208877/problema-form-php</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 15:42:47 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/208877.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 07 Dec 2014 20:50:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to problema form php on Wed, 10 Dec 2014 11:48:06 GMT]]></title><description><![CDATA[<p dir="auto">Premesso che ho fatto molta fatica a leggere il codice perché non è per nulla indentato. Però se non ho sbagliato a riportare a capo e la parentesi e simili l'else in questione si attiva con l'if (!filter_var($email, FILTER_VALIDATE_EMAIL)) e non con quello relativo al messaggio</p>
]]></description><link>https://dev.connect.gt/post/1181666</link><guid isPermaLink="true">https://dev.connect.gt/post/1181666</guid><dc:creator><![CDATA[pietror]]></dc:creator><pubDate>Wed, 10 Dec 2014 11:48:06 GMT</pubDate></item></channel></rss>