Beste Rose33,
Of integreer het in je pagina ...
Ik ben naar je site gegaan en de code bekeken van je contact.htm.
De volledige code van die pagina wordt dan
Vergeet niet de link in je menu op alle pagina's te veranderen van contact.htm naar contact.php
mvg,
Coderunner
Of integreer het in je pagina ...
Ik ben naar je site gegaan en de code bekeken van je contact.htm.
De volledige code van die pagina wordt dan
Code: Selecteer alles
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style><!--a{text-decoration:none}//--></style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RC WEBDESIGN</title>
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
#content {
height: 698px;
width: 767px;
margin-top: 4px;
margin-right: auto;
margin-left: auto;
background-image: url(http://www.danycalis.com/babysites/portachtergrond.jpg);
position: static;
}
#index {
position:relative;
left:0px;
top:360px;
width:83px;
height:100px;
z-index:2;
}
#zijkolom {
position:relative;
left:350px;
top:88px;
width:383px;
height:155px;
z-index:3;
}
#email {
position:relative;
left:357px;
top:95px;
width:383px;
height:300px;
z-index:3;
}
.style3 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
</head>
<body>
<div id="content">
<div id="index">
<img src="http://www.danycalis.com/babysites/zijkolomtrans.gif" width="83" height="100" border="0" usemap="#Map" />
<map name="Map" id="Map"><area shape="rect" coords="1,4,85,31" href="index.htm" target="_self" />
<area shape="rect" coords="0,29,87,52" href="gallerij.htm" target="_self" />
<area shape="rect" coords="1,52,89,77" href="portfolio.htm" target="_self" />
<area shape="rect" coords="0,76,87,111" href="contact.htm" target="_self" />
</map>
</div>
<div id="zijkolom">
<!--***************************************************************
DEEL 1 begin php om formulier te controleren en te verzenden.
***************************************************************-->
<?php
if ($_SERVER['REQUEST_METHOD'] == "POST")
{
if (!empty($_POST['naam']) && !empty($_POST['email']) && !empty($_POST['bericht']))
{
$headers = "From: " .addslashes(htmlspecialchars($_POST['naam'])). " <" .addslashes(htmlspecialchars($_POST['email'])). ">\n";
$headers .= "Content-Type: text/html;charset=iso-8859-1";
//
// Hieronder jouw email adres in vullen en eventueel het onderwerp van de email
//
$naar = "jouwemail@adres.com";
$onderwerp = "ONDERWERP VAN EMAILBERICHT";
$bericht = "<html>\n";
$bericht .= "<head>\n";
$bericht .= "<title>Contactformulier</title>\n";
$bericht .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n";
$bericht .= "<style>\n";
$bericht .= "table,body\n";
$bericht .= "{\n";
$bericht .= " font-size: 11px;\n";
$bericht .= " font-family: Helvetica, Arial;\n";
$bericht .= "}\n";
$bericht .= "</style>\n";
$bericht .= "</head>\n";
$bericht .= "<body>\n";
$bericht .= nl2br(htmlspecialchars(stripslashes($_POST['bericht'])));
$bericht .= "</body>\n";
$bericht .= "</html>\n";
mail($naar, $onderwerp, $bericht, $headers);
?>
<!--*******************************************************
DEEL 2 begin: melding dat het formulier is verzonden
*******************************************************-->
<html>
<head>
<title>VERZONDEN</title>
</head>
<body>
Het bericht is succesvol verzonden! <br>
Bedankt voor je email.
</body>
</html>
<?php
}
else
{
?>
<!--*******************************************************
DEEL 3 vergeten ingevulde velden in formulier in html
*******************************************************-->
<html>
<head>
<title>Oops!</title>
</head>
<body>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
Naam<br> <input type="text" name="naam" value="<?php echo $_POST['naam']; ?>"><br>
E-mailadres<br> <input type="text" name="email" value="<?php echo $_POST['email']; ?>"><br>
Bericht<br><textarea cols="30" rows="10" name="bericht"><?php echo $_POST['bericht']; ?></textarea><br><br>
<input type="submit" value="Verzenden">
</form>
<span class="style3">Oops! Je bent iets vergeten in te vullen!</span><br><br>
</body>
</html>
<?php
}
}
else
{
?>
<!--***********************************************
DEEL 4 is het eigenlijke formulier in html
***********************************************-->
<html>
<head>
<title>Contactformulier</title>
</head>
<body>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
Naam<br> <input type="text" name="naam"><br>
E-mailadres<br> <input type="text" name="email"><br>
Bericht<br><textarea cols="30" rows="10" name="bericht"></textarea><br><br>
<input type="submit" value="Verzenden">
</form>
</body>
</html>
<?php
}
?>
</div>
</div>
</body>
</html>mvg,
Coderunner
Laatst gewijzigd door coderunner op 10 apr 2008, 16:41, 1 keer totaal gewijzigd.


