my below validation is not working.But it is working in other html pages when i test .please tell me whether there is any error in my php page.

<?php
	 require_once('common/dblayer.php');
  	 $db=new dblayer();
	 $enc_id=$_GET["id"];
	 $agreementdetails=$db->getfeedback($enc_id);
	 $companyname = $agreementdetails[0]["company"];
	 $fullname = $agreementdetails[0]["name"];
	 $agreed = $agreementdetails[0]["agreed"];
?>

<!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">
<head>

<title>CLIENT SATISFACTION SURVEY © </title>


<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--

	function validate(){
	
	len = document.acceptform.check1.length;

	for (i = 0; i <len; i++) {
	if (document.acceptform.check1[i].checked) {
	return true;
	}
	}

	else {
		alert("No Location Chosen");
		return false;
	}

	}
-->
</SCRIPT>

</head>

<body>

<form name="acceptform" method="post" action="reg_feedback1.php" onSubmit="return validate();">

<table width="889" align="center">
  <tr><td width="879">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
		<tr>
			<td  colspan="4" align="center" class="style1"><h2>CLIENT SATISFACTION SURVEY</h2></td>
			<td width="19%" align="left" valign="top" style=" height:50px; vertical-align:text-bottom; text-align:right"><div valign="top">&reg;</div>
			 </td>
		</tr>
		<tr>
			<td height="2" colspan="3" style="border-bottom-style: none; border-bottom-width: medium; height:5px;">			</td>
		</tr>
</table><hr />
</td></tr><tr><td align="right" valign="top">
	
	<table width="164" align="right" cellpadding="0" cellspacing="0" class="style2">
	</table></td></tr><tr><td>
	
    <blockquote>
      <blockquote>
        <p class="style1"><strong> What  is Important to you?</strong></p>
        <p class="style1">Indicate the level of importance for each issue listed below  as they pertain to your projects in general (kindly click the number): </p>
      </blockquote>
    </blockquote></td>
</tr><tr><td height="58">
<table width="686"  border="1" align="center" cellpadding="3" cellspacing="0" class="border1">
 <tr>
          <td width="148" align="center">   <span class="style5">1 </span></td>
          <td align="center">          <span class="style5">2     </span></td>
          <td align="center">       <span class="style5">3 </span></td>
          <td align="center">         <span class="style5">4    </span></td>
          <td align="center">             <span class="style5">5</span></td>
        </tr></table>
             
     
	  </td></tr>
	  <tr><td height="21">&nbsp;</td>
	  </tr><tr><td>
<table width="496" border="0" align="center">
  <tr>
    <td width="492" ><p><strong>The Result Consistent w/</strong>
      <? $enc_id=$_GET["id"]; ?>
      <input type="hidden" name="enc_id" value="<? echo $enc_id; ?>" />
    </p>
</td>
  </tr>
</table>
</td></tr><tr><td>
<table width="686" border="1" align="center" cellpadding="3" cellspacing="0" class="border1">
  <tr>
    <td width="332"><span class="style1"><strong>Original Scope</strong></span></td>
    <td width="41"><input type="radio" name="check1" value="1">1</td>
    <td width="41"><input type="radio" name="check1" value="2">2</td>
    <td width="41"><input type="radio" name="check1" value="3">3</td>
    <td width="44"><input type="radio" name="check1" value="4">4</td>
    <td width="41"><input type="radio" name="check1" value="5">5</td>
	
	
  </tr>
  
</table>
</td></tr><tr><td>
<table width="496" border="0" align="center">
  <tr>
    <td width="492"><p><strong>The Services offered to you, in terms of </strong></p></td>
  </tr>
</table>
</td></tr><tr><td >
<table width="686" border="1" align="center" cellpadding="3" cellspacing="0" class="border1">
  </tr>
  
</table></td></tr><tr><td height="48" align="center">
<input type="submit" name="submit" value="Next">
								
</td>
</tr>
</table>
<?
}
?>
</form>
</body>
</html>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--

function validate()
{
	
	len = document.acceptform.check1.length;
	
	for (i = 0; i <len; i++) 
	{
		if (document.acceptform.check1[i].checked) 
		{
			return true;
		}
	}
	
	else 
	{
		alert("No Location Chosen");
		return false;
	}

}
-->
</SCRIPT>

You have an else without an if

This article has been dead for over six months. Start a new discussion instead.