Archief - 2 errors die ik echt ni wegkrijg :s

Het archief is een bevroren moment uit een vorige versie van dit forum, met andere regels en andere bazen. Deze posts weerspiegelen op geen enkele manier onze huidige ideeën, waarden of wereldbeelden en zijn op sommige plaatsen gecensureerd wegens ontoelaatbaar. Veel zijn in een andere tijdsgeest gemaakt, al dan niet ironisch - zoals in het ironische subforum Off-Topic - en zouden op dit moment niet meer gepost (mogen) worden. Toch bieden we dit archief nog graag aan als informatiedatabank en naslagwerk. Lees er hier meer over of start een gesprek met anderen.

scorpken

Legacy Member
HTML:
<?php
session_start();
$sessie = session_id();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

<title>Hier vul je de titel van je pagina in.</title>
</head>
<body>
<fieldset> 
<?php
include 'incdatabank.php';
$query1 = "SELECT * FROM loggedInUsers WHERE sessionID='$sessie'";
$sql1=mysql_query($query1) or die (mysql_error());
while ($obj=mysql_fetch_object($sql1)) {
$naam = $obj->lname;
}
$query2 = "SELECT usertype FROM users WHERE lname='$naam'";
$sql2=mysql_query($query2) or die (mysql_error());
while ($obj=mysql_fetch_object($sql2)) {
$type = $obj->usertype;
}
if ($type == 0){
echo "<fieldset><form id='Nieuws' method='post' action='toevoegennieuws2.php'>";
echo "<table border='0'>";
echo        "<tr>";
echo                "<td>Onderwerp:</td>";
echo                "<td><input type='text' name='onderwerp' /></td>";
echo "</tr>";
echo "<tr>";
echo                "<td>Bericht:</td>";
echo                "<td><textarea name='bericht' rows='10' cols='70'></textarea></td>";
echo "</tr>";
echo "</table>";
echo "<input type='submit' value='verzenden' />";
echo "<input type='reset' value='leegmaken' />";
echo "</form>";
echo "</fieldset>";
}else{
	if ($type == 10){
	echo "<fieldset><form id='Nieuws' method='post' action='toevoegennieuws2.php'>";
	echo "<table border='0'>";
	echo        "<tr>";
	echo                "<td>Onderwerp:</td>";
	echo                "<td><input type='text' name='onderwerp' /></td>";
	echo "</tr>";
	echo "<tr>";
	echo                "<td>Bericht:</td>";
	echo                "<td><textarea name='bericht' rows='10' cols='70'></textarea></td>";
	echo "</tr>";
	echo "</table>";
	echo "<input type='submit' value='verzenden' />";
	echo "<input type='reset' value='leegmaken' />";
	echo "</form>";
	echo "</fieldset>";
	}else{
		if ($type == 1){
		echo "<fieldset><form id='Nieuws' method='post' action='toevoegennieuws2.php'>";
		echo "<table border='0'>";
		echo        "<tr>";
		echo                "<td>Onderwerp:</td>";
		echo                "<td><input type='text' name='onderwerp' /></td>";
		echo "</tr>";
		echo "<tr>";
		echo                "<td>Bericht:</td>";
		echo                "<td><textarea name='bericht' rows='10' cols='70'></textarea></td>";
		echo "</tr>";
		echo "</table>";
		echo "<input type='submit' value='verzenden' />";
		echo "<input type='reset' value='leegmaken' />";
		echo "</form>";
		echo "</fieldset>";
		}else{
			echo "U hebt onvoldoende rechten om nieuws toe te voegen. Enkel leerkrachten, admins en root kunnen nieuws toevoegen.";	
}
}
}

?>
</fieldset>
</body>
</html>

Validation Output: 2 Errors

1. Error Line 10, Column 304: document type does not allow element "input" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag.

…put type='submit' value='verzenden' /><input type='reset' value='leegmaken' /

&#9993;

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
2. Error Line 10, Column 344: document type does not allow element "input" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag.

…nput type='reset' value='leegmaken' /></form></fieldset></fieldset>

&#9993;

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

frenzal

Legacy Member
idd, je kan uw php tag sluiten en verder gaan met html en dan weer php openen

PHP:
<? if($condition){ ?>
<p><b>html tekst</b></p>
<? }else{ ?>
...
<? } ?>
Het archief is een bevroren moment uit een vorige versie van dit forum, met andere regels en andere bazen. Deze posts weerspiegelen op geen enkele manier onze huidige ideeën, waarden of wereldbeelden en zijn op sommige plaatsen gecensureerd wegens ontoelaatbaar. Veel zijn in een andere tijdsgeest gemaakt, al dan niet ironisch - zoals in het ironische subforum Off-Topic - en zouden op dit moment niet meer gepost (mogen) worden. Toch bieden we dit archief nog graag aan als informatiedatabank en naslagwerk. Lees er hier meer over of start een gesprek met anderen.
Terug
Bovenaan