- From: J.A. Verhoeven <j_a_verhoeven@hotmail.com>
- Date: Wed, 16 Apr 2008 23:40:57 +0200
- To: <www-validator@w3.org>
- Message-ID: <BAY118-DAV43E24D9E4C8140B790EB1BAEA0@phx.gbl>
Validating http://verhoeven-nl.eu/test/verhoeven/nl/formact.php
Error [70]: "end tag for X omitted, but OMITTAG NO was specified"
--------------------------------------------------------------------------------
Hi dear reader,
I possibly found a bug in the validator since I tried to validate this page http://verhoeven-nl.eu/test/verhoeven/nl/formact.php which is a form processing page of the new version of my current website. There's something really strange going on. I am doing a lot of testing and validate every page I make. And I'm also constantly reading the specs to keep up with the standards at W3C. I removed a lot of php code to trace down the error on the page. The page validates when I remove the commented code from the file. But as soon as I try to validate the page with "exit;}" in it, I get very strange results. Here is the file from the link above.
--------------------------------------------------------------------------------
<!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="nl" lang="nl">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate" /><!-- check performance -->
<meta http-equiv="Cache-Control" content="post-check=1, pre-check=2" /><!-- check performance -->
<meta http-equiv="expires" content="-1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="generator" content="notepad++" />
<meta name="keywords" content="contact form handler feedback" />
<meta name="description" content="Computer Service & Support in Tilburg. Deskundige hulp bij installatie, configuratie en beveiliging van computer systemen & webdesign volgens W3C standaarden." />
<meta name="author" content="Incognito" />
<link type="image/x-icon" href="http://verhoeven-nl.eu/favicon.ico" rel="icon" />
<link type="text/css" href="../styles/default.css" rel="stylesheet" media="screen" />
<title>Verhoeven .:. Cont@ct</title>
</head>
<body>
<div id="container">
<div id="header"><?php include('header.php');?></div>
<div id="menu"><?php include('menu.php');?></div>
<div id="left">
<?php
$voornaam = htmlspecialchars($_POST["voornaam"]);
$achternaam = htmlspecialchars($_POST["achternaam"]);
$geslacht = htmlspecialchars($_POST["geslacht"]);
$dag = htmlspecialchars($_POST["dag"]);
$maand = htmlspecialchars($_POST["maand"]);
$jaar = htmlspecialchars($_POST["jaar"]);
$emailadres = htmlspecialchars($_POST["emailadres"]);
$via = htmlspecialchars($_POST["via"]);
$onderwerp = htmlspecialchars($_POST["onderwerp"]);
$bericht = htmlspecialchars($_POST["bericht"]);
$captcha = htmlspecialchars($_POST["captcha"]);
if (!$achternaam) {
echo "<h2>O o p s ...</h2>";
echo "<p>U heeft geen achternaam ingevuld!</p>";
echo "<p>Klik om terug te gaan en je naam in te vullen.</p>";
<!-- when adding this part the page will not validate and gives strange results
exit;}?>
-->
<!-- and this is the rest of the code I removed from the file to trace down the validation error
if (!$geslacht) {
echo "<h2>O o p s ...</h2>";
echo "<p>U heeft geen e-mailadres ingevuld! ";
echo "Klik om terug te gaan en je e-mailadres in te vullen.</p>";
exit;
}
if (!$emailadres) {
echo "<h2>O o p s ...</h2>";
echo "<p>U heeft geen e-mailadres ingevuld! ";
echo "Klik om terug te gaan en je e-mailadres in te vullen.</p>";
exit;
}
if (!$onderwerp) {
echo "<h2>O o p s ...</h2>";
echo "<p>U heeft geen onderwerp ingevuld! ";
echo "Klik om terug te gaan en het onderwerp in te vullen.</p>";
exit;
}
if (!$bericht) {
echo "<h2>O o p s ...</h2>";
echo "<p>U heeft geen bericht ingevuld! ";
echo "Klik om terug te gaan en een bericht te typen.</p>";
exit;
}
if ($captcha!="tien") {
echo "<h2>O o p s ...</h2>";
echo "<p>Het antwoord op de vraag van de captcha is onjuist! ";
echo "Hint: tel de getallen bij elkaar op en toets het antwoord in letters in het veld eronder. ";
echo "Deze methode wordt gebruikt om spam tegen te gaan en is daarom een verplicht veld. ";
echo "Ga terug om het juiste antwoord in te voeren.</p>";
exit;
}
else {
$tijd = time();
$datum = strftime("%A %d %B %Y %Z %H:%M", $tijd);
$ip = getenv("REMOTE_ADDR");
$message = "Voornaam: $voornaam<br />Achternaam: $achternaam<br />Geslacht: $geslacht<br />Geboortedatum: $dag $maand $jaar<br />Heeft mijn website gevonden via: $via<br />E-mail: $emailadres<br />IP-address: $ip<br />Datum: $datum<br />Onderwerp: $onderwerp<br />Bericht:<br />
__________________________________________________
<br />$bericht<br />
__________________________________________________";
$mailadres = "j@verhoeven-nl.eu";
$message = str_replace ("<br />","\n", $message);
mail("$mailadres", "Bericht van verhoeven-nl.eu", $message, "Afzender: " . $emailadres . "");
echo "<h2>B e d a n k t !</h2>";
echo "<p>Uw bericht is verzonden. U krijgt zo snel mogelijk antwoord.</p>";
}
-->
</div>
<div id="right"><?php include('right.php');?></div>
<div id="footer"><?php include('footer.php');?></div>
</div>
</body>
</html>
--------------------------------------------------------------------------------
I don't wanna be a pain the ass, but I just take the work of W3C seriously and try to do my best applying the standards. Please can you tell if it's a bug in the validator, or if there is a workaround or something, because I am really stuck on this one. I've tried everything without succes.
Thanx in advance,
John Verhoeven (NL)
j_a_verhoeven@hotmail.com
http://verhoeven-nl.eu/test/verhoeven/
Received on Thursday, 17 April 2008 03:10:58 UTC