ENTER in contactformulier

Gestart doorRubenmaxie20 reacties45 weergaven

21 berichten · pagina 2 van 2

Rubenmaxie

Lid · Topicstarter

Berichten
592
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb nu alleen nog
staan in me mail i.p.v. ENTER, en dus een verbetering, maar weet iemand hoe ik dat kan wegkrijgen?

Dit is nu mijn code:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"header.php"[/COLOR][COLOR= #007700]);[/COLOR]
?>
<html>
<head>
<style type="text/css">
<!--
h1 {
    font: 18pt;
}

h2 {
    font: 16pt;
}

textarea {
    height: 100px;
    width: 250px;
}

a {
    color: #0000FF;
    text-decoration: none;
}

a:hover {
    color: #0000FF;
    text-decoration: underline;
}
-->
</style>
<title>Untitled</title>
</head>
<body>
<h1>Navigatie</h1>
<a href="index.php">Home</a><br/>
<a href="login.php">Inloggen</a><br/>
<a href="register.php">Aanmelden</a><br/>
<a href="contact.php">Contact</a><br/><br/>
<hr width="100%">
[COLOR= #0000BB]<?php
$message[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]]));[/COLOR]
[COLOR= #0000BB]$email[/COLOR] [COLOR= #007700]=[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$subject[/COLOR] [COLOR= #007700]=[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]subject[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]" met het e-mailadres "[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]).[/COLOR] [COLOR= #DD0000]" stuurde het volgende bericht:"[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"n"[/COLOR] [COLOR= #007700].[/COLOR]
 [COLOR= #DD0000]"___________________________________________________________________"[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"n"[/COLOR] [COLOR= #007700].[/COLOR] 
[COLOR= #0000BB]$message[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"n"[/COLOR] [COLOR= #007700].[/COLOR]
 [COLOR= #DD0000]"___________________________________________________________________"[/COLOR][COLOR= #007700];[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]]) ==[/COLOR] [COLOR= #DD0000]""[/COLOR] [COLOR= #007700]||[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]) ==[/COLOR] [COLOR= #DD0000]""[/COLOR] [COLOR= #007700]||[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]subject[/COLOR][COLOR= #007700]]) ==[/COLOR] [COLOR= #DD0000]""[/COLOR] [COLOR= #007700]||[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]]) ==[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"U moet alle gegevens invullen!"[/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 mail is succesvol verzonden!"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"ruben.maxie@hotmail.com"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$subject[/COLOR][COLOR= #007700]),[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);
}[/COLOR]
[URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];[/COLOR]
?>
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
je moet nog headers meegeven (html headers)
0
Rubenmaxie

Lid · Topicstarter

Berichten
592
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Die heb ik toch meegegeven? Of bedoel je die XHTML enzo... confused
0
Rubenmaxie

Lid · Topicstarter

Berichten
592
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nu heb ik dit:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"header.php"[/COLOR][COLOR= #007700]);[/COLOR]
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<style type="text/css">
<!--
h1 {
    font: 18pt;
}

h2 {
    font: 16pt;
}

textarea {
    height: 100px;
    width: 250px;
}

a {
    color: #0000FF;
    text-decoration: none;
}

a:hover {
    color: #0000FF;
    text-decoration: underline;
}
-->
</style>
<title>Untitled</title>
</head>
<body>
<h1>Navigatie</h1>
<a href="index.php">Home</a><br/>
<a href="login.php">Inloggen</a><br/>
<a href="register.php">Aanmelden</a><br/>
<a href="contact.php">Contact</a><br/><br/>
<hr width="100%">
[COLOR= #0000BB]<?php
$message[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]]));[/COLOR]
[COLOR= #0000BB]$email[/COLOR] [COLOR= #007700]=[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$subject[/COLOR] [COLOR= #007700]=[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]subject[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]" met het e-mailadres "[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]).[/COLOR] [COLOR= #DD0000]" stuurde het volgende bericht:"[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"n"[/COLOR] [COLOR= #007700].[/COLOR]
 [COLOR= #DD0000]"___________________________________________________________________"[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"n"[/COLOR] [COLOR= #007700].[/COLOR] 
[COLOR= #0000BB]$message[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"n"[/COLOR] [COLOR= #007700].[/COLOR]
 [COLOR= #DD0000]"___________________________________________________________________"[/COLOR][COLOR= #007700];[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]]) ==[/COLOR] [COLOR= #DD0000]""[/COLOR] [COLOR= #007700]||[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]) ==[/COLOR] [COLOR= #DD0000]""[/COLOR] [COLOR= #007700]||[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]subject[/COLOR][COLOR= #007700]]) ==[/COLOR] [COLOR= #DD0000]""[/COLOR] [COLOR= #007700]||[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]message[/COLOR][COLOR= #007700]]) ==[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"U moet alle gegevens invullen!"[/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 mail is succesvol verzonden!"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"ruben.maxie@hotmail.com"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$subject[/COLOR][COLOR= #007700]),[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);
}[/COLOR]
[URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];[/COLOR]
?>
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Nee... Ik bedoel headers bij de mail()
0
Rubenmaxie

Lid · Topicstarter

Berichten
592
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik snap het niet meer, wat zijn die headers dan? confused
Edit:
Ik heb eindelijk de contactpagina af, en snap nu wat headers zijn.

Bedankt allemaal, smile
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