View Full Version : Require validation fields in form

11-25-2008, 08:25 AM
Hi, i pretty new to this, am trying to add required fields to the script below and have tryed it with this but can get it working : http://www.dynamicdrive.com/dynamicindex16/requiredcheck.htm
and i want to use an valid email validation to but that didnt work to...

This is the script that we are using now :

<!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">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>blablabla - contactformulier</title>
<script type="text/javascript" src="simpletreemenu.js">

* Simple Tree Menu- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code


<link rel="stylesheet" type="text/css" href="simpletree.css" />
<link rel="stylesheet" type="text/css" href="styles.css" />

<body topmargin="0">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<th class="style2" scope="row">&nbsp;</th>
<td width="950" background="bg.jpg" class="style2"><p><!--url's used in the movie-->
<!--text used in the movie-->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="950" height="335" id="top" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="top.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#3e3e3e" />
<embed src="top.swf" quality="high" bgcolor="#ffffff" width="950" height="335" name="top" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object><script type="text/javascript" src="ieupdate.js"></script></p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<th width="4" scope="row">&nbsp;</th>
<td width="276">
<td width="10">&nbsp;</td>
<td width="665">
<table width="94%" border="0" cellspacing="0" cellpadding="0">

$message = "Deze items werden aangevinkt:<BR><BR>";

foreach($_POST as $veld => $waarde){

if ($veld == "Naam") {
$message = $message ."<BR><BR>Dit zijn de contactgegevens:<BR><BR>";
if ($veld <> "submit" && $veld <> "reset") {
$message = $message .$veld.": ".$waarde."<br />";
if ($veld == "Email") {
$email = $waarde;

// Hier worden de headers aangemaakt
$extra = "MIME-Version: 1.0\n";
$extra .= "From: ".$email."\n";
$extra .= "Content-type: text/html; charset=iso-8859-1\n";
$extra .= "To: info@xxxxxxx.be \n";

mail("", "Contactformulier op blablabla.be - nederlands", $message, $extra);

<BR />
Bedankt voor uw reactie.<br />
U mag spoedig een antwoord ontvangen.

<br />
<br />
<br />
Met vriendelijke groeten,
<br />
blablabla.be </td>
<th scope="row">&nbsp;</th>
<td valign="top">&nbsp;</td>
<td class="style2">&nbsp;</td>


any help would be great...