Contact formulier

Gestart doorOne2xs0 reacties15 weergaven

1 berichten · pagina 1 van 1

One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"header.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"<h2>contact opnemen</h2>"[/COLOR][COLOR= #007700]);[/COLOR]  
[COLOR= #0000BB]$naar[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Mail@fmgroup.me"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]verzend[/COLOR][COLOR= #007700]]))
{[/COLOR]  
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
    {[/COLOR]  
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"U heeft geen naam ingevuld!<br />"[/COLOR][COLOR= #007700];[/COLOR]  
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=javascript:history.back();>&gt; Klik hier om terug te gaan!</a>"[/COLOR][COLOR= #007700];   
    }[/COLOR]  
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
    {[/COLOR]  
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"U heeft geen e-mail adress ingevuld!<br />"[/COLOR][COLOR= #007700];[/COLOR]  
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=javascript:history.back();>&gt;Klik hier om terug te gaan!</a>"[/COLOR][COLOR= #007700];  
    }[/COLOR]  
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
    {[/COLOR]  
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"U heeft geen bericht ingevuld!<br />"[/COLOR][COLOR= #007700];[/COLOR]  
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=javascript:history.back();>&gt;Klik hier om terug te gaan!</a>"[/COLOR][COLOR= #007700];  
    }[/COLOR]  
    [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]onderwerp[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
    {[/COLOR]  
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"U heeft geen onderwerp ingevuld!<br />"[/COLOR][COLOR= #007700];[/COLOR]  
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=javascript:history.back();>&gt;Klik hier om terug te gaan!</a>"[/COLOR][COLOR= #007700];  
    }[/COLOR]  
    [URL="http://www.php.net/else"]else[/URL]  
    [COLOR= #007700]{[/COLOR]  
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/eregi"]eregi[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,4})$"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]))
        {[/COLOR]  
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"U heeft geen geldig e-mail adress ingevuld!<br />"[/COLOR][COLOR= #007700];[/COLOR]  
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=javascript:history.back();>&gt;Klik hier om terug te gaan!</a>"[/COLOR][COLOR= #007700];  
        }[/COLOR]  
        [URL="http://www.php.net/else"]else[/URL]  
        [COLOR= #007700]{[/COLOR]  
            [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]" 
<html> 
<head> 
  <title>Contact</title> 
</head> 
<body> 
"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"<br>heeft vandaag dit bericht gestuurd, met het ip ["[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"].
  <br>
  <br>
  <hr width=100%>
  <table border=0 width=100%> 
   <tr>
    <td>Naam:</td>
    <td>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
   </tr>
   <tr>
    <td>Categorie:</td>
    <td>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]categorie[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
   </tr>
   <tr> 
    <td>Onderwerp:</td> 
    <td>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]onderwerp[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td> 
   </tr> 
   <tr> 
    <td>Bericht:</td> 
    <td>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td> 
   </tr> 
  </table> 
  <hr width=100%>
</body> 
</html> 
"[/COLOR][COLOR= #007700];[/COLOR]  
            [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"MIME-Version: 1.0
"[/COLOR][COLOR= #007700];[/COLOR]  
            [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Content-type: text/html; charset=iso-8859-1
"[/COLOR][COLOR= #007700];[/COLOR]  
            [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"From: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" <"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]">
"[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$naar[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]onderwerp[/COLOR][COLOR= #007700]],[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]))
            {[/COLOR]  
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Uw Bericht is verstuurd!<br>[/COLOR][COLOR= #007700];  
            }[/COLOR]  
            [URL="http://www.php.net/else"]else[/URL]
            [COLOR= #007700]{[/COLOR]  
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Uw bericht is helaas niet verstuurd.[/COLOR][COLOR= #007700];  
            }  
        }  
    }  
}[/COLOR]  
[URL="http://www.php.net/else"]else[/URL]  
[COLOR= #007700]{[/COLOR]  
?>  
<table border="0"> 
<form method=post> 
<tr> 
  <td>Naam:</td> 
  <td><input type=text name=naam />&nbsp;<a href="javascript:alert(Voer hier uw naam in, Het is niet verplicht uw achternaam te vermelden.)"><img src="images/icons/i.png" border="0" /></a></td> 
</tr> 
<tr> 
  <td>E-mail:</td> 
  <td><input type=text name=email />&nbsp;<a href="javascript:alert(Voer hier uw e-mail adres in, Dit moet een goed en werkend e-mail adres zijn,
 anders kunnen wij geen contact met u terug opnemen.)"><img src="images/icons/i.png" border="0" /></a></td> 
</tr> 
<tr>
<td>IP Adres:</td>
<td><input type="text" style="color:gray;border:1px solid gray;" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]];[/COLOR] ?>" ReadOnly="1" Disabled="1">&nbsp;<a href="javascript:alert(In dit vak staat uw IP Adres. Dit word automatisch meegezonden om spam te voorkomen. (we doen er verder niks mee!))"><img src="images/icons/i.png" border="0" /></a></td>
</tr>
<tr>
  <td>Categorie:</td>
  <td><select name="categorie"><option value="Contact">Contact</option><option value="Vraag">Vraag</option><option value="Bestellen">Bestellen</option><option value="Website">Website</option><option value="Overige">Overige</option></select>&nbsp;<a href="javascript:alert(Welke doelgroep heeft uw vraag, Hiermee word de prioriteit automatisch berekent.)"><img src="images/icons/i.png" border="0" /></a></td>
<tr> 
  <td>Onderwerp:</td> 
  <td><input type=text name=onderwerp />&nbsp;<a href="javascript:alert(Typ hier het onderwerp van de mail in, als dit een goed aansprekend onderwerp is zult u sneller antwoord krijgen.)"><img src="images/icons/i.png" border="0" /></a></td> 
</tr> 
<tr> 
  <td>Bericht:</td> 
  <td><textarea name=bericht cols="40" rows="5"></textarea>&nbsp;<a href="javascript:alert(Typ hier het bericht in dat u naar ons wilt versturen, probeer wel zo duidelijk mogenlijk te zijn.)"><img src="images/icons/i.png" border="0" /></a></td> 
</tr> 
<tr> 
  <td>&nbsp;</td>
  <td><input type=submit value=Verzend name=verzend class="submit" />&nbsp;<a href="javascript:alert(Indien u klaar bent met het invullen van alle velden kunt u hier klikken om uw mail te verzenden.
Uw mail word hoogstwaarschijnlijk binnen 48 uur beantwoord.)"><img src="images/icons/i.png" border="0" /></a></td> 
</tr> 
</form> 
</table> 
[COLOR= #0000BB]<?php[/COLOR]  
[COLOR= #007700]}[/COLOR]  
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"footer.php"[/COLOR][COLOR= #007700]);[/COLOR]
?>


ik heb nu deze code maar ik wil dat als er een bericht wordt gestuurd met categorie Website
hij het mailtje verzend naar niels@fmgroup.me
hoe kan ik dat doen?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren