Formulier verzenden

Status
Niet open voor verdere reacties.

EmmaV

Gebruiker
Lid geworden
30 dec 2009
Berichten
50
Hoi, ik heb in Dreamweaver CS4 een formulier gemaakt.
Alleen de knop 'verzenden' werkt niet, kan iemand mij helpen?
Het zou verzonden moeten worden naar emma_vanneste@hotmail.com

code:
<!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"><!-- InstanceBegin template="/Templates/Template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Template</title>
<style type="text/css">
<!--
a:link {
color: #FFF;
text-decoration: none;
}
a:visited {
color: #FFF;
text-decoration: none;
}
a:hover {
color: #FFF;
text-decoration: underline;
}
a:active {
text-decoration: none;
color: #FFF;
}
body,td,th {
color: #FFF;
}
body {
background-image: url();
border-top-color: #7C7C7C;
border-right-color: #7C7C7C;
border-bottom-color: #7C7C7C;
border-left-color: #7C7C7C;
}
-->
</style>
</head>

<body>
<table width="75%" border="0" align="center" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#7C7C7C"><blockquote>
<blockquote>
<p><img src="Foto's/Banner2.jpg" width="1053" height="467" /> Zaterdag 15 Mei 2010</p>
</blockquote>
</blockquote></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#CCCCCC"><table width="100%" border="0" align="left">
<tr>
<td width="15%" height="192" valign="top"><table width="100%" border="0">
<tr>
<td><table width="100%" border="0" align="left">
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Homepage.html">Home</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Informatie.html">Informatie</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Uitslagen.html">Uitslagen</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Inschrijven.html">Inschrijven</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Foto.html">Foto's</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Gastenboek.html">Gastenboek</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Contact.html">Contact</a></td>
</tr>
<tr>
<td height="24" align="left" bgcolor="#7C7C7C"><a href="Sponsers3.html">Sponsers</a></td>
</tr>
</table></td>
</tr>
<tr>
<td align="left" bgcolor="#CDCDCD">&nbsp;</td>
</tr>
</table></td>
<td width="85%" align="left" valign="top" bgcolor="#7C7C7C"><!-- InstanceBeginEditable name="Body" -->
<p>Schrijf je in via het volgende formulier.</p>
<form action="mailformulier.php" method="post" enctype="text/plain" name="FrmInschrijving" id="FrmInschrijving">
<table width="100%" border="0">
<tr>
<td width="11%">Naam</td>
<td width="89%"><label>
<input name="txtNaam" type="text" id="txtNaam" size="60" />
</label></td>
</tr>
<tr>
<td>Voornaam</td>
<td><label>
<input name="txtVoornaam" type="text" id="txtVoornaam" size="60" />
</label></td>
</tr>
<tr>
<td>Adres</td>
<td><label>
<input name="txtAdres" type="text" id="txtAdres" size="60" />
</label></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0">
<tr>
<td width="11%"><p>Postcode</p></td>
<td width="8%"><label>
<input name="txtPostcode" type="text" id="txtPostcode" size="6" />
</label></td>
<td width="11%"> Gemeente</td>
<td width="70%"><label>
<input name="txtGemeente" type="text" id="txtGemeente" size="37" />
</label></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0">
<tr>
<td width="30%">Geboortedatum (dd - mm - jjjj)</td>
<td width="70%"><label>
<input name="txtGeboortedatum" type="text" id="txtGeboortedatum" size="32" />
</label></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0">
<tr>
<td width="9%">Geslacht</td>
<td width="91%"><p>
<label>
<input type="radio" name="optGeslacht" value="Vrouw" id="RadioGroup1_0" />
Vrouw</label>
<br />
<label>
<input type="radio" name="OptGeslacht" value="Man" id="RadioGroup1_1" />
Man</label>
<br />
</p></td>
</tr>
<tr>
<td>Reeks</td>
<td><p>
<label>
<input type="radio" name="optReeks" value="Jogging" id="RadioGroup1_2" />
Jogging (€4)</label>
<br />
<label>
<input type="radio" name="OptReeks" value="Prestatieloop" id="RadioGroup1_3" />
Prestatieloop (€6)</label>
</p></td>
</tr>
</table></td>
</tr>
</table>
<p>
<label>
<input type="submit" name="cmdVersturen" id="cmdVersturen" value="Verzenden" />
</label>
<label>
<input type="reset" name="cmdWissen" id="cmdWissen" value="Wissen" />
</label>
</p>
</form>
<p>Uw inschrijving is pas definintief na het overschrijven van het gepaste geld op rekeningnummer: 385-0700452-78 !</p>
<!-- InstanceEndEditable --></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#7C7C7C"><p>4de Herdenkingsloop Rudy Bekaert - Zaterdag 15 Mei 2010</p></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
 
Ik heb die site eens bekeken maar net zoals bij alle andere sites blijft het mij onduidelijk wat ik juist moet doen. (Ik ken niets van php!)

Dit is mijn code nu:
<!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"><!-- InstanceBegin template="/Templates/Template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Template</title>
<style type="text/css">
<!--
a:link {
color: #FFF;
text-decoration: none;
}
a:visited {
color: #FFF;
text-decoration: none;
}
a:hover {
color: #FFF;
text-decoration: underline;
}
a:active {
text-decoration: none;
color: #FFF;
}
body,td,th {
color: #FFF;
}
body {
background-image: url();
border-top-color: #7C7C7C;
border-right-color: #7C7C7C;
border-bottom-color: #7C7C7C;
border-left-color: #7C7C7C;
}
-->
</style>
</head>

<body>
<table width="75%" border="0" align="center" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#7C7C7C"><blockquote>
<blockquote>
<p><img src="Foto's/Banner2.jpg" width="1053" height="467" /> Zaterdag 15 Mei 2010</p>
</blockquote>
</blockquote></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#CCCCCC"><table width="100%" border="0" align="left">
<tr>
<td width="15%" height="192" valign="top"><table width="100%" border="0">
<tr>
<td><table width="100%" border="0" align="left">
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Homepage.html">Home</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Informatie.html">Informatie</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Uitslagen.html">Uitslagen</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Inschrijven.html">Inschrijven</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Foto.html">Foto's</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Gastenboek.html">Gastenboek</a></td>
</tr>
<tr>
<td align="left" bgcolor="#7C7C7C"><a href="Contact.html">Contact</a></td>
</tr>
<tr>
<td height="24" align="left" bgcolor="#7C7C7C"><a href="Sponsers3.html">Sponsers</a></td>
</tr>
</table></td>
</tr>
<tr>
<td align="left" bgcolor="#CDCDCD">&nbsp;</td>
</tr>
</table></td>
<td width="85%" align="left" valign="top" bgcolor="#7C7C7C"><!-- InstanceBeginEditable name="Body" -->
<p>Schrijf je in via het volgende formulier.</p>
<form action="mailformulier.php" method="post" enctype="text/plain" name="FrmInschrijving" id="FrmInschrijving">
<table width="100%" border="0">
<tr>
<td width="11%">Naam</td>
<td width="89%"><label>
<input name="txtNaam" type="text" id="txtNaam" size="60" />
</label></td>
</tr>
<tr>
<td>Voornaam</td>
<td><label>
<input name="txtVoornaam" type="text" id="txtVoornaam" size="60" />
</label></td>
</tr>
<tr>
<td>Adres</td>
<td><label>
<input name="txtAdres" type="text" id="txtAdres" size="60" />
</label></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0">
<tr>
<td width="11%"><p>Postcode</p></td>
<td width="8%"><label>
<input name="txtPostcode" type="text" id="txtPostcode" size="6" />
</label></td>
<td width="11%"> Gemeente</td>
<td width="70%"><label>
<input name="txtGemeente" type="text" id="txtGemeente" size="37" />
</label></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0">
<tr>
<td width="30%">Geboortedatum (dd - mm - jjjj)</td>
<td width="70%"><label>
<input name="txtGeboortedatum" type="text" id="txtGeboortedatum" size="32" />
</label></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0">
<tr>
<td width="9%">Geslacht</td>
<td width="91%"><p>
<label>
<input type="radio" name="optGeslacht" value="Vrouw" id="RadioGroup1_0" />
Vrouw</label>
<br />
<label>
<input type="radio" name="OptGeslacht" value="Man" id="RadioGroup1_1" />
Man</label>
<br />
</p></td>
</tr>
<tr>
<td>Reeks</td>
<td><p>
<label>
<input type="radio" name="optReeks" value="Jogging" id="RadioGroup1_2" />
Jogging (€4)</label>
<br />
<label>
<input type="radio" name="OptReeks" value="Prestatieloop" id="RadioGroup1_3" />
Prestatieloop (€6)</label>
</p></td>
</tr>
</table></td>
</tr>
</table>
<p>
<label>
<input type="submit" name="cmdVersturen" id="cmdVersturen" value="Verzenden" />
</label>
<label>
<input type="reset" name="cmdWissen" id="cmdWissen" value="Wissen" />
</label>
</p>
<?php
//Als men op de Submit knop heeft gedrukt van het formulier...
if (isset($_POST['verzenden'])) {
if (!isset($_POST['Naam'])) {
$error = "Gelieve je naam in te vullen.<BR />";
} if (!isset($_POST['Voornaam'])) {
$error .= "Gelieve je voornaam in te vullen.<BR />";
} if (!isset($_POST['Adres'])) {
$error .= "Gelieve je adres in te vullen.";
} if (!isset($_POST['Postnummer'])) {
$error .= "Gelieve je postnummer in te vullen.<BR />";
} if (!isset($_POST['Gemeente'])) {
$error .= "Gelieve je Gemeente in te vullen.<BR />";
} if (!isset($_POST['Geboortedatum'])) {
$error .= "Gelieve je Geboortedatum in te vullen.<BR />";
}

if (!isset($error)) {
$bericht = "Naam = ".$_POST['Naam'] " " "Voornaam = ".$_POST['Voornaam'] \n";
$bericht .="Adres = ".$_POST['Adres'] " " "Postcode = ".$_POST['Postcode'] " " "Gemeente = ".$_POST['Gemeente'] \n";
$bericht .="Geboortedatum = ".$_POST['Geboortedatum'] " " "Geslacht = ".$_POST['Geslacht'] " " "Reeks = ".$_POST['Reeks'];

mail ("emma_vanneste@hotmail.com", "Inschrijvingsformulier", $bericht, "FROM: HerdenkingsloopRudyBekaert.be");

} else {

echo "Gelieve het inschrijvingsformullier volledig en juist in te vullen.<BR /><BR />";

}

} else {

echo "U moet eerst het formulier invullen.";

}
?>
</form>
<p>Uw inschrijving is pas definintief na het overschrijven van het gepaste geld op rekeningnummer: 385-0700452-78 !</p>
<!-- InstanceEndEditable --></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#7C7C7C"><p>4de Herdenkingsloop Rudy Bekaert - Zaterdag 15 Mei 2010</p></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
 
Ik heb al veel gegoogled en al hele php schema's overgenomen, maar ik blijf er problemen mee hebben.
Is er iemand die mijn code kan aanpassen?
Ik vrees ervoor dat ik de oplossing nooit zelf zal vinden.

(Toch al bedankt voor de hulp die jullie mij gegeven hebben :p)
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan