Dear friends,
I have the following PHP page. I have to validate it from W3C online Validator. I am using this page as a frame in a another page. It works well without any error. But gives 4 errors in validation. I have tried many tweaks (Including saving without BOM) but all in vain. I am to need to validate the code only on website (by giving URL to validator). Webpage is attached with this post. So please guide me about it. The problem is that
- When code is directly input to online Validator then following errors appears.
Line 98, Column 7: xmlParsePI : no target name
<?=strtoupper($objRow->title);?>
Line 99, Column 89: xmlParsePI : no target name
…a, Arial, Helvetica, sans-serif; font-size:11px;">(<?=$objPro->tname;?>)
Line 101, Column 10: xmlParsePI : no target name
Line 102, Column 10: xmlParsePI : no target name
Line 103, Column 10: xmlParsePI : no target name
Line 104, Column 39: xmlParsePI : no target name
- when I hosted my site and validated that page by giving the URL to Validator then the following errors appears.
Line 1, Column 5: no document type declaration; will parse without validation
Session Expire Now…Please Login First
Line 2, Column 5: document type does not allow element “P” here
Line 7, Column 9: end tag for element “BODY” which is not open
---------------- Original Webpage Code ---------------------------------------------------
<title>
Teacher Lesson Plan
</title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script language="JAVASCRIPT" type="text/javascript">
//<![CDATA[
function Verify()
{
if(document.Form.txttitle.value == "")
{
alert("Please Enter Title of Lesson !");
document.Form.txttitle.focus();
return(false);
}
else if(document.Form.txtKeywords.value == "")
{
alert("Please Enter Keywords For This Lesson !");
document.Form.txtKeywords.focus();
return(false);
}
else if(document.Form.txtSDesc.value == "")
{
alert("Please Enter Short Description");
document.Form.txtSDesc.focus();
return(false);
}
else if(document.Form.txtDetail.value == "")
{
alert("Please Enter Destail Description");
document.Form.txtDetail.focus();
return(false);
}
}
function Edit(LID)
{
window.open("editlesson.php?LID="+LID, "Babar", 'width=900, height=380, top= 90, left=85');
}
function Detail(LID)
{
window.open("lessondetail.php?LID="+LID, "Babar", 'width=900, height=700, top= 0, left=50');
}
//]]>
</script>
<form name="Form" id="Form" action="">
<table cellspacing="0" cellpadding="4" align="center" width="100%" border="1">
<!--bordercolor="#000-->
<tr bgcolor="#069">
<td align="center"><font color="#fff">View Lessons of All Teacher</font></td>
</tr>
</table>
<table cellspacing="0" cellpadding="6" align="center" width="100%" border="1">
<!--bordercolor="#e7f3ff-->
<tr bgcolor="#E7F3FF" style="color:#06c;">
<td>Title</td>
<td>Keywords</td>
<td>Short Description</td>
<td>Detail Description</td>
<td>Action</td>
</tr>
<tr style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;">
<td>
<b><a href="JAVASCRIPT:Detail(%3C?=$objRow-%3Elesson_id;?%3E);" style="text-decoration:none;">
DBMS</a></b><br />
<span style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;">(Naveed)</span>
</td>
<td>Database Management Sysytem</td>
<td>DBMS</td>
<td>DBMSSS SSSSSSSSSSSSSSS</td>
<td bgcolor="<?=$Color;?>">N/A</td>
</tr>
<tr style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;">
<td>
<b><a href="JAVASCRIPT:Detail(%3C?=$objRow-%3Elesson_id;?%3E);" style="text-decoration:none;">
SOSIAL SOFTWARE</a></b><br />
<span style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;">(Zeeshan)</span>
</td>
<td>Web 2.0</td>
<td>Related to Web 2.0 Technologi</td>
<td>It belongs to Umea University.</td>
<td bgcolor="<?=$Color;?>">N/A</td>
</tr>
<tr style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;">
<td>
<b><a href="JAVASCRIPT:Detail(%3C?=$objRow-%3Elesson_id;?%3E);" style="text-decoration:none;">
SOCIAL SOFTWARE</a></b><br />
<span style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;">(Naveed)</span>
</td>
<td>soft ware song social</td>
<td>It is a course</td>
<td>It is a course.It is a course.It is a course.It is a course.It is a course.It is a course.It is a course.</td>
<td bgcolor="<?=$Color;?>">N/A</td>
</tr>
<tr style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;">
<td>
<b><a href="JAVASCRIPT:Detail(%3C?=$objRow-%3Elesson_id;?%3E);" style="text-decoration:none;">
FVFGHDFGHFDH</a></b><br />
<span style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;">(Naveed)</span>
</td>
<td>tgt try t tr ytrytr ty</td>
<td>tytr tr ytr ytr tytruyt uyt</td>
<td>uyiyuiy ytut yyui iuyiuyiyuiuyiyuiyuiui iu iugffg gyu y guv gyuy</td>
<td bgcolor="<?=$Color;?>">N/A</td>
</tr>
<tr style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;">
<td>
<b><a href="JAVASCRIPT:Detail(%3C?=$objRow-%3Elesson_id;?%3E);" style="text-decoration:none;">
ADSAS SDSAD </a></b><br />
<span style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;">(Yasin Khan)</span>
</td>
<td>sdsadas sd sad s sd s sdf sa d</td>
<td>as sfd f d fds fgg fgfg fg </td>
<td> fdgf dfd gfdhghhgf gfjhg jh h jhg jkh ffhf hf hfghfghgfhfghg hgfhfg gfhhfjgh</td>
<td bgcolor="<?=$Color;?>">N/A</td>
</tr>
<tr style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;">
<td>
<b><a href="JAVASCRIPT:Detail(%3C?=$objRow-%3Elesson_id;?%3E);" style="text-decoration:none;">
TEST LESSON</a></b><br />
<span style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;">(Ayaz Khan)</span>
</td>
<td>Test Lesson </td>
<td>This is for testing purpose.</td>
<td>This lesson is created for the checking purpose of the system. </td>
<td bgcolor="<?=$Color;?>">N/A</td>
</tr>
</table>
</form>
<p>
<a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
</p>