showers10
Programmer
- Jul 25, 2011
- 1
Please i need help on how to validate my forms thanx..... Below is the form structure.
<form action="thanks.php" method="post" enctype="multipart/form-data" onsubmit='return formValidator()'>
<table width="580" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="270" class="txt"><strong>Name of Orphanage Institution :</strong></td>
<td width="310"><label>
<input type="text" id='oname' name="oname" size="40"/>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Name of Director-In-Charge :</strong></td>
<td><label>
<input type="text" id='dname' name="dname" size="40"/>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Name of Social Welfare Supervisor :</strong></td>
<td><label>
<input type="text" id='swname' name="swname" size="40"/>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Date of 1<sup>st</sup> Social Welfare Inspection :</strong></td>
<td><label>
<input type="text" id='insname' name="insname" size="40"/>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Number of residential children :</strong></td>
<td><label>
<input type="text" id='nores' name="nores" size="40"/>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Number of non-residential children :</strong></td>
<td><label>
<input type="text" id='nonres' name="nonres" size="40"/>
</label></td>
</tr></table>
<table><tr>
<td width="350" class="txt"><strong>REASON FOR BEING IN THE ORPHANAGE :</strong></td>
<td width="50" class="txt"> <strong>TICK : </strong></td>
<td width="170" class="txt"> <strong><center>NUMBER : </center></strong></td>
</tr>
<tr>
<td width="355" class="txt"><strong>Abandoned :</strong></td>
<td width="50"><label><center>
<input type="checkbox" id='chk1' name="chk1"></center>
</label></td>
<td width="170"><label><center>
<input type="text" id='noaban' name="noaban" size="20" /></center>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Orphaned :</strong></td>
<td width="50"><label><center>
<input type="checkbox" id='chk2' name="chk2"></center>
</label></td>
<td width="170"><label><center>
<input type="text" id='noorph' name="noorph" size="20" /></center>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Surrendered :</strong></td>
<td width="50"><label><center>
<input type="checkbox" id='chk3' name="chk3"></center>
</label></td>
<td width="170"><label><center>
<input type="text" id='nosur' name="nosur" size="20" /></center>
</label></td>
</tr>
<tr>
<td class="txt"><strong>In need of care and protection :</strong></td>
<td width="50"><label><center>
<input type="checkbox" id='chk4' name="chk4"></center>
</label></td>
<td width="170"><label><center>
<input type="text" id='incare' name="incare" size="20" /></center>
</label></td>
</tr></table>
<table><tr>
<td width="580" class="txt" colspan="4"><strong>CHILDREN THAT COULD BE RESETTLED :</strong></td></tr>
<tr>
<td width="244" class="txt"><center><strong>NAME</strong></center></td>
<td width="30" class="txt"><center><strong>AGE</strong></center></td>
<td width="36" class="txt"><center><strong>SEX</strong></center></td>
<td width="268" class="txt"><center> <strong>GUARDIAN</strong></center></td>
</tr>
<tr>
<td width="244"><label>
<textarea name="resname" cols="32" id='resname'></textarea>
</label></td>
<td width="30"><label>
<textarea name="resage" cols="4" id='resage'></textarea>
</label></td>
<td width="36"><label>
<textarea name="resex" cols="7" id='resex'></textarea>
</label></td>
<td width="268"><label>
<textarea name="resguard" cols="33" id='resguard'></textarea>
</label></td>
</tr>
<tr>
<td width="580" class="txt" colspan="4"><strong>ADOPTED CHILDREN :</strong></td></tr>
<tr>
<td width="244" class="txt"><center><strong>NAME</strong></center></td>
<td width="30" class="txt"><center><strong>AGE</strong></center></td>
<td width="36" class="txt"><center><strong>SEX</strong></center></td>
<td width="268" class="txt"><center> <strong>IS THERE ANY CONSENT FORM</strong></center></td>
</tr>
<tr>
<td width="244"><label>
<textarea name="adoname" cols="32" id='adoname'></textarea>
</label></td>
<td width="30"><label>
<textarea name="adoage" cols="4" id='adoage'></textarea>
</label></td>
<td width="36"><label>
<textarea name="adosex" cols="7" id='adosex'></textarea>
</label></td>
<td width="268"><label>
<textarea name="adoconsent" cols="33" id='adoconsent'></textarea>
</label></td>
</tr>
<tr>
<td width="580" class="txt" colspan="4"><strong>SURRENDERED CHILDREN :</strong></td>
</tr>
<tr>
<td width="244" class="txt"><center><strong>NAME</strong></center></td>
<td width="30" class="txt"><center><strong>AGE</strong></center></td>
<td width="36" class="txt"><center><strong>SEX</strong></center></td>
<td width="268" class="txt"><center> <strong>IS THERE A LEGAL BACK-UP?</strong></center></td>
</tr>
<tr>
<td width="244"><label>
<textarea name="surname" cols="32" id='surname'></textarea>
</label></td>
<td width="30"><label>
<textarea name="surage" cols="4" id='surage'></textarea>
</label></td>
<td width="36"><label>
<textarea name="sursex" cols="7" id="sursex"></textarea>
</label></td>
<td width="268"><label>
<textarea name="surlegal" cols="33" id='surlegal'></textarea>
</label></td>
</tr>
<tr>
<td width="580" class="txt" colspan="4"><strong>HOW MANY CHILDREN ARE IN NEED OF URGENT MEDICAL ATTENTION :</strong></td>
</tr>
<tr>
<td width="244" class="txt"><center><strong>NAME</strong></center></td>
<td width="30" class="txt"><center><strong>AGE</strong></center></td>
<td width="36" class="txt"><center><strong>SEX</strong></center></td>
<td width="268" class="txt"><center> <strong>BRIEF MEDICAL REPORT (if any)</strong></center></td>
</tr>
<tr>
<td width="244"><label>
<textarea name="urgname" cols="32" id='urgname'></textarea>
</label></td>
<td width="30"><label>
<textarea name="urgage" cols="4" id='urgage'></textarea>
</label></td>
<td width="36"><label>
<textarea name="urgsex" cols="7" id="urgsex"></textarea>
</label></td>
<td width="268"><label>
<textarea name="urgrep" cols="33" id='urgrep'></textarea>
</label></td>
</tr></table>
<table width="580"> <tr>
<td width="580" class="txt" colspan="4"><strong>LEGAL AND FINANCIAL REQUIREMENTS :</strong></td>
</tr>
<tr>
<td width="332" class="txt"><center><strong>HAS YOUR INSTITUTION:</strong></center></td>
<td width="30" class="txt"><center><strong>YES</strong></center></td>
<td width="36" class="txt"><center><strong>NO</strong></center></td>
<td width="180" class="txt"><center> <strong>NOTES</strong></center></td>
</tr>
<tr>
<td width="332" class="txt">Been registered with the Registrar General</td>
<td width="30"><label><center>
<input type="checkbox" id='chk5' name="chk5"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk6' name="chk6"></center>
</label></td>
<td width="180"><label>
<input type="text" id='rgenote' name="rgenote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">A copy of its regulations attached</td>
<td width="30"><label><center>
<input type="checkbox" id='chk7' name="chk7"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk8' name="chk8"></center>
</label></td>
<td width="180"><label>
<input type="text" id='regnote' name="regnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">A copy of its By-Laws attacthed</td>
<td width="30"><label><center>
<input type="checkbox" id='chk9' name="chk9"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk10' name="chk10"></center>
</label></td>
<td width="180"><label>
<input type="text" id='bylawnote' name="bylawnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">A copy of its constitution attacthed</td>
<td width="30"><label><center>
<input type="checkbox" id='chk11' name="chk11"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk12' name="chk12"></center>
</label></td>
<td width="180"><label>
<input type="text" id='consnote' name="consnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">A management committee (particulars attached)</td>
<td width="30"><label><center>
<input type="checkbox" id='chk13' name="chk13"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk14' name="chk14"></center>
</label></td>
<td width="180"><label>
<input type="text" id='comnote' name="comnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">Work with its local Social Welfare Officer</td>
<td width="30"><label><center>
<input type="checkbox" id='chk15' name="chk15"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk16' name="chk16"></center>
</label></td>
<td width="180"><label>
<input type="text" id='swonote' name="swonote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">Been auditored</td>
<td width="30"><label><center>
<input type="checkbox" id='chk17' name="chk17"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk18' name="chk18"></center>
</label></td>
<td width="180"><label>
<input type="text" id='audnote' name="audnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">Keeps record of Accounts correctly</td>
<td width="30"><label><center>
<input type="checkbox" id='chk19' name="chk19"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk20' name="chk20"></center>
</label></td>
<td width="180"><label>
<input type="text" id='accnote' name="accnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">Keeps record of children correctly</td>
<td width="30"><label><center>
<input type="checkbox" id='chk21' name="chk21"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk22' name="chk22"></center>
</label></td>
<td width="180"><label>
<input type="text" id='childnote' name="childnote" size="29" />
</label></td>
</tr></table>
<table width="580"> <tr>
<td width="300" class="txt" colspan="2"><strong>HOW MUCH DO YOU SPEND ON :</strong></td>
<td width="" class="txt" colspan="2"><strong>PER MONTH ¢ </strong></td>
</tr>
<tr>
<td width="300" class="txt" colspan="2">Food</strong></td>
<td width="" class="txt" colspan="2"><label>
<input type="text" id='food' name="food" size="20" />
</label></td>
</tr>
<tr>
<td width="300" class="txt" colspan="2">Clothing</td>
<td width="" class="txt" colspan="2"><label>
<input type="text" id='cloth' name="cloth" size="20" />
</label></td>
</tr>
<tr>
<td width="300" class="txt" colspan="2">Education</td>
<td width="" class="txt" colspan="2"><label>
<input type="text" id='educ' name="educ" size="20" />
</label></td>
</tr>
<tr>
<td width="300" class="txt" colspan="2">NHIS</td>
<td width="" class="txt" colspan="2"><label>
<input type="text" id='nhis' name="nhis" size="20" />
</label></td>
</tr>
<tr>
<td colspan="2"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td align="right" colspan="2"><label>
<input type="submit" value="Submit" />
</label></td>
<td colspan="2"><label>
<input type="submit" name="Submit2" value="Reset" />
</label></td>
</tr>
</table>
</form>
<form action="thanks.php" method="post" enctype="multipart/form-data" onsubmit='return formValidator()'>
<table width="580" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="270" class="txt"><strong>Name of Orphanage Institution :</strong></td>
<td width="310"><label>
<input type="text" id='oname' name="oname" size="40"/>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Name of Director-In-Charge :</strong></td>
<td><label>
<input type="text" id='dname' name="dname" size="40"/>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Name of Social Welfare Supervisor :</strong></td>
<td><label>
<input type="text" id='swname' name="swname" size="40"/>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Date of 1<sup>st</sup> Social Welfare Inspection :</strong></td>
<td><label>
<input type="text" id='insname' name="insname" size="40"/>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Number of residential children :</strong></td>
<td><label>
<input type="text" id='nores' name="nores" size="40"/>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Number of non-residential children :</strong></td>
<td><label>
<input type="text" id='nonres' name="nonres" size="40"/>
</label></td>
</tr></table>
<table><tr>
<td width="350" class="txt"><strong>REASON FOR BEING IN THE ORPHANAGE :</strong></td>
<td width="50" class="txt"> <strong>TICK : </strong></td>
<td width="170" class="txt"> <strong><center>NUMBER : </center></strong></td>
</tr>
<tr>
<td width="355" class="txt"><strong>Abandoned :</strong></td>
<td width="50"><label><center>
<input type="checkbox" id='chk1' name="chk1"></center>
</label></td>
<td width="170"><label><center>
<input type="text" id='noaban' name="noaban" size="20" /></center>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Orphaned :</strong></td>
<td width="50"><label><center>
<input type="checkbox" id='chk2' name="chk2"></center>
</label></td>
<td width="170"><label><center>
<input type="text" id='noorph' name="noorph" size="20" /></center>
</label></td>
</tr>
<tr>
<td class="txt"><strong>Surrendered :</strong></td>
<td width="50"><label><center>
<input type="checkbox" id='chk3' name="chk3"></center>
</label></td>
<td width="170"><label><center>
<input type="text" id='nosur' name="nosur" size="20" /></center>
</label></td>
</tr>
<tr>
<td class="txt"><strong>In need of care and protection :</strong></td>
<td width="50"><label><center>
<input type="checkbox" id='chk4' name="chk4"></center>
</label></td>
<td width="170"><label><center>
<input type="text" id='incare' name="incare" size="20" /></center>
</label></td>
</tr></table>
<table><tr>
<td width="580" class="txt" colspan="4"><strong>CHILDREN THAT COULD BE RESETTLED :</strong></td></tr>
<tr>
<td width="244" class="txt"><center><strong>NAME</strong></center></td>
<td width="30" class="txt"><center><strong>AGE</strong></center></td>
<td width="36" class="txt"><center><strong>SEX</strong></center></td>
<td width="268" class="txt"><center> <strong>GUARDIAN</strong></center></td>
</tr>
<tr>
<td width="244"><label>
<textarea name="resname" cols="32" id='resname'></textarea>
</label></td>
<td width="30"><label>
<textarea name="resage" cols="4" id='resage'></textarea>
</label></td>
<td width="36"><label>
<textarea name="resex" cols="7" id='resex'></textarea>
</label></td>
<td width="268"><label>
<textarea name="resguard" cols="33" id='resguard'></textarea>
</label></td>
</tr>
<tr>
<td width="580" class="txt" colspan="4"><strong>ADOPTED CHILDREN :</strong></td></tr>
<tr>
<td width="244" class="txt"><center><strong>NAME</strong></center></td>
<td width="30" class="txt"><center><strong>AGE</strong></center></td>
<td width="36" class="txt"><center><strong>SEX</strong></center></td>
<td width="268" class="txt"><center> <strong>IS THERE ANY CONSENT FORM</strong></center></td>
</tr>
<tr>
<td width="244"><label>
<textarea name="adoname" cols="32" id='adoname'></textarea>
</label></td>
<td width="30"><label>
<textarea name="adoage" cols="4" id='adoage'></textarea>
</label></td>
<td width="36"><label>
<textarea name="adosex" cols="7" id='adosex'></textarea>
</label></td>
<td width="268"><label>
<textarea name="adoconsent" cols="33" id='adoconsent'></textarea>
</label></td>
</tr>
<tr>
<td width="580" class="txt" colspan="4"><strong>SURRENDERED CHILDREN :</strong></td>
</tr>
<tr>
<td width="244" class="txt"><center><strong>NAME</strong></center></td>
<td width="30" class="txt"><center><strong>AGE</strong></center></td>
<td width="36" class="txt"><center><strong>SEX</strong></center></td>
<td width="268" class="txt"><center> <strong>IS THERE A LEGAL BACK-UP?</strong></center></td>
</tr>
<tr>
<td width="244"><label>
<textarea name="surname" cols="32" id='surname'></textarea>
</label></td>
<td width="30"><label>
<textarea name="surage" cols="4" id='surage'></textarea>
</label></td>
<td width="36"><label>
<textarea name="sursex" cols="7" id="sursex"></textarea>
</label></td>
<td width="268"><label>
<textarea name="surlegal" cols="33" id='surlegal'></textarea>
</label></td>
</tr>
<tr>
<td width="580" class="txt" colspan="4"><strong>HOW MANY CHILDREN ARE IN NEED OF URGENT MEDICAL ATTENTION :</strong></td>
</tr>
<tr>
<td width="244" class="txt"><center><strong>NAME</strong></center></td>
<td width="30" class="txt"><center><strong>AGE</strong></center></td>
<td width="36" class="txt"><center><strong>SEX</strong></center></td>
<td width="268" class="txt"><center> <strong>BRIEF MEDICAL REPORT (if any)</strong></center></td>
</tr>
<tr>
<td width="244"><label>
<textarea name="urgname" cols="32" id='urgname'></textarea>
</label></td>
<td width="30"><label>
<textarea name="urgage" cols="4" id='urgage'></textarea>
</label></td>
<td width="36"><label>
<textarea name="urgsex" cols="7" id="urgsex"></textarea>
</label></td>
<td width="268"><label>
<textarea name="urgrep" cols="33" id='urgrep'></textarea>
</label></td>
</tr></table>
<table width="580"> <tr>
<td width="580" class="txt" colspan="4"><strong>LEGAL AND FINANCIAL REQUIREMENTS :</strong></td>
</tr>
<tr>
<td width="332" class="txt"><center><strong>HAS YOUR INSTITUTION:</strong></center></td>
<td width="30" class="txt"><center><strong>YES</strong></center></td>
<td width="36" class="txt"><center><strong>NO</strong></center></td>
<td width="180" class="txt"><center> <strong>NOTES</strong></center></td>
</tr>
<tr>
<td width="332" class="txt">Been registered with the Registrar General</td>
<td width="30"><label><center>
<input type="checkbox" id='chk5' name="chk5"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk6' name="chk6"></center>
</label></td>
<td width="180"><label>
<input type="text" id='rgenote' name="rgenote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">A copy of its regulations attached</td>
<td width="30"><label><center>
<input type="checkbox" id='chk7' name="chk7"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk8' name="chk8"></center>
</label></td>
<td width="180"><label>
<input type="text" id='regnote' name="regnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">A copy of its By-Laws attacthed</td>
<td width="30"><label><center>
<input type="checkbox" id='chk9' name="chk9"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk10' name="chk10"></center>
</label></td>
<td width="180"><label>
<input type="text" id='bylawnote' name="bylawnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">A copy of its constitution attacthed</td>
<td width="30"><label><center>
<input type="checkbox" id='chk11' name="chk11"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk12' name="chk12"></center>
</label></td>
<td width="180"><label>
<input type="text" id='consnote' name="consnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">A management committee (particulars attached)</td>
<td width="30"><label><center>
<input type="checkbox" id='chk13' name="chk13"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk14' name="chk14"></center>
</label></td>
<td width="180"><label>
<input type="text" id='comnote' name="comnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">Work with its local Social Welfare Officer</td>
<td width="30"><label><center>
<input type="checkbox" id='chk15' name="chk15"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk16' name="chk16"></center>
</label></td>
<td width="180"><label>
<input type="text" id='swonote' name="swonote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">Been auditored</td>
<td width="30"><label><center>
<input type="checkbox" id='chk17' name="chk17"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk18' name="chk18"></center>
</label></td>
<td width="180"><label>
<input type="text" id='audnote' name="audnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">Keeps record of Accounts correctly</td>
<td width="30"><label><center>
<input type="checkbox" id='chk19' name="chk19"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk20' name="chk20"></center>
</label></td>
<td width="180"><label>
<input type="text" id='accnote' name="accnote" size="29" />
</label></td>
</tr>
<tr>
<td width="332" class="txt">Keeps record of children correctly</td>
<td width="30"><label><center>
<input type="checkbox" id='chk21' name="chk21"></center>
</label></td>
<td width="36"><label><center>
<input type="checkbox" id='chk22' name="chk22"></center>
</label></td>
<td width="180"><label>
<input type="text" id='childnote' name="childnote" size="29" />
</label></td>
</tr></table>
<table width="580"> <tr>
<td width="300" class="txt" colspan="2"><strong>HOW MUCH DO YOU SPEND ON :</strong></td>
<td width="" class="txt" colspan="2"><strong>PER MONTH ¢ </strong></td>
</tr>
<tr>
<td width="300" class="txt" colspan="2">Food</strong></td>
<td width="" class="txt" colspan="2"><label>
<input type="text" id='food' name="food" size="20" />
</label></td>
</tr>
<tr>
<td width="300" class="txt" colspan="2">Clothing</td>
<td width="" class="txt" colspan="2"><label>
<input type="text" id='cloth' name="cloth" size="20" />
</label></td>
</tr>
<tr>
<td width="300" class="txt" colspan="2">Education</td>
<td width="" class="txt" colspan="2"><label>
<input type="text" id='educ' name="educ" size="20" />
</label></td>
</tr>
<tr>
<td width="300" class="txt" colspan="2">NHIS</td>
<td width="" class="txt" colspan="2"><label>
<input type="text" id='nhis' name="nhis" size="20" />
</label></td>
</tr>
<tr>
<td colspan="2"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td align="right" colspan="2"><label>
<input type="submit" value="Submit" />
</label></td>
<td colspan="2"><label>
<input type="submit" name="Submit2" value="Reset" />
</label></td>
</tr>
</table>
</form>