Current File : /home/inlingua/www/sensoriumpsychologists.com/screening/franchise/student_details_update.php |
<?php
include('../franchise_back/connection.php');
$mysqli = new mysqli($host_db,$user_db,$pass_db,$name_db);
if ($mysqli -> connect_errno) {
echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
exit();
}
session_start();
$msg="";
/*$balance=0;
$e_wallet_obj=new e_wallet();
$e_wallet_obj->set_value("franchise_id",$session_id);
$balance=$e_wallet_obj->e_wallet_balance();
?>
<?php
if($balance<$admission_fees)
{
echo("Error : Insufficient funds...Please add more funds...!!!");
exit();
}*/
//$ref_no=$_REQUEST['ref_no'];
$student_id=$_GET['ref_no'];
$prepared_statement="SELECT * FROM shristi_child_details WHERE table_id=$student_id ";
$result = $mysqli -> query($prepared_statement);
$row = $result -> fetch_assoc();
if(!empty($_POST)){
require_once("../franchise_between/student_funcs.php");
//echo "<pre>";print_r($_REQUEST);
//die;
$arr = explode('-', $_REQUEST['dob']);
$dateOfBirth = $arr[2].'-'.$arr[1].'-'.$arr[0];
$child_name=$_POST['child_name'];
$table_id=$_POST['table_id'];
$email=$_POST['email'];
$age=$_POST['age'];
$gender=$_POST['gender'];
$dob_day=$arr[2];
$dob_month=$arr[1];
$dob_year=$arr[0];
$education=$_POST['education'];
$school_name=$_POST['school_name'];
$franchise_id=$_POST['franchise_id'];
$contact_no=$_POST['contact_no'];
$informant=$_POST['informant'];
$c_local=$_POST['c_local'];
$c_city=$_POST['c_city'];
$c_district=$_POST['c_district'];
$c_state=$_POST['c_state'];
$c_pincode=$_POST['c_pincode'];
$p_local=$_POST['p_local'];
$p_city=$_POST['p_city'];
$p_district=$_POST['p_district'];
$p_state=$_POST['p_state'];
$p_pincode=$_POST['p_pincode'];
$problem=$_POST['problem'];
$walking=$_POST['walking'];
$first_sentence=$_POST['first_sentence'];
$toilet_behaviour=$_POST['toilet_behaviour'];
$self_help=$_POST['self_help'];
$sleeping_pattern=$_POST['sleeping_pattern'];
$play=$_POST['play'];
$play_group=$_POST['play_group'];
$type_of_play=$_POST['type_of_play'];
$behav_with_family=$_POST['behav_with_family'];
$reln_with_siblings=$_POST['reln_with_siblings'];
$admission_fees="";
$payment_no ="";
$dob_date=$_POST['dob'];
$p_city=trim($p_city);
$total_chars=strlen($p_city);
if($total_chars<3){
echo("Error : Permanent City must be atleast 3 characters long...");
exit();
}
$student_obj=new student_funcs();
$student_obj->set_value("franchise_id",$franchise_id);
$student_obj->set_value("child_name",$child_name);
$student_obj->set_value("email",$email);
$student_obj->set_value("age",$age);
$student_obj->set_value("gender",$gender);
$student_obj->set_value("dob_date",$dob_date);
$student_obj->set_value("education",$education);
$student_obj->set_value("school_name",$school_name);
$student_obj->set_value("contact_no",$contact_no);
$student_obj->set_value("informant",$informant);
$student_obj->set_value("c_local",$c_local);
$student_obj->set_value("c_city",$c_city);
$student_obj->set_value("c_district",$c_district);
$student_obj->set_value("c_state",$c_state);
$student_obj->set_value("c_pincode",$c_pincode);
$student_obj->set_value("p_local",$p_local);
$student_obj->set_value("p_city",$p_city);
$student_obj->set_value("p_district",$p_district);
$student_obj->set_value("p_state",$p_state);
$student_obj->set_value("p_pincode",$p_pincode);
$student_obj->set_value("problem",$problem);
$student_obj->set_value("walking",$walking);
$student_obj->set_value("first_sentence",$first_sentence);
$student_obj->set_value("toilet_behaviour",$toilet_behaviour);
$student_obj->set_value("self_help",$self_help);
$student_obj->set_value("sleeping_pattern",$sleeping_pattern);
$student_obj->set_value("play",$play);
$student_obj->set_value("play_group",$play_group);
$student_obj->set_value("type_of_play",$type_of_play);
$student_obj->set_value("behav_with_family",$behav_with_family);
$student_obj->set_value("reln_with_siblings",$reln_with_siblings);
$student_obj->set_value("admission_fees",$admission_fees);
$student_obj->set_value("table_id",$table_id);
$payment_no=$student_obj->new_admission_update();
$msg="Updated successfully...";
//$temp_filename="student_initial_fees_payment.php?payment_no=".$payment_no;
//header("Location:/franchise/redirect_back.php?q=".$temp_filename."&msg=".$msg);
}
?>
<!doctype html>
<html>
<?php include("common/page_head.php");?>
<script src="javascript/numberkey.js"></script>
<body>
<?php include("common/header_var.php");?>
<?php
$top_enrollment=$top_val;
?>
<?php include("common/header.php");?>
<div id="main_container">
<div id="main">
<br />
<br />
<div class="top_heading_page">UPDATE CHILD DETAILS</div>
<div class="top_heading_page" style="color:green;"><?php echo $msg; ?></div>
<br>
<br>
<fieldset id="next-1" >
<legend>PERSONAL DETAILS</legend>
<form method="post" name="myform" onSubmit="return submit_form()">
<!--<form method="post" name="myform" enctype="multipart/form-data">-->
<input type="hidden" name="table_id" id="table_id" value="<?php echo $row['table_id']; ?>" style="width:300px;" />
<input type="hidden" name="franchise_id" id="franchise_id" value="<?php echo $row['franchise_id']; ?>" style="width:300px;" />
<input type="hidden" name="school_name" id="school_name" value="<?php echo $row['school_name']; ?>" style="width:300px;" />
<table border="0" class="tables_fieldset" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:120px;">Child's Name</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><input type="text" name="child_name" id="child_name" value="<?php echo $row['name']; ?>" style="width:300px;" /></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:120px;">Email</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><input type="text" name="email" id="email" value="<?php echo $row['email']; ?>" style="width:300px;" /></td>
</tr>
</table></td>
</tr>
<tr>
<td style="width:50%;"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:120px;">Age</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><input type="text" name="age" id="age" value="<?php echo $row['age']; ?>" style="width:300px;" />
years </td>
</tr>
</table></td>
<td style="width:50%;"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:120px;">Gender </td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><select name="gender" id="gender">
<option value="">---</option>
<option <?php if($row['gender']=='Male') { echo 'selected'; } ?> >Male</option>
<option <?php if($row['gender']=='Female') { echo 'selected'; } ?> >Female</option>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:120px;">Date of Birth</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><input type="text" name="dob" id="dob" value="<?php echo $row['dob_date']; ?>" style="width:300px;" />
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:120px;">Education</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><select name="education" id="education">
<option value="">---</option>
<option <?php if($row['education']=='1') { echo 'selected'; } ?> value="1">1st</option>
<option <?php if($row['education']=='2') { echo 'selected'; } ?> value="2">2nd</option>
<option <?php if($row['education']=='3') { echo 'selected'; } ?> value="3">3rd</option>
<option <?php if($row['education']=='4') { echo 'selected'; } ?> value="4">4th</option>
<option <?php if($row['education']=='5') { echo 'selected'; } ?> value="5">5th</option>
</select>
std </td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:120px;">Contact No</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><input type="text" name="contact_no" value="<?php echo $row['contact_no']; ?>" id="contact_no" style="width:200px;" /></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:120px;">Informant</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><input type="text" name="informant" id="informant" value="<?php echo $row['informant']; ?>" style="width:500px;" /></td>
</tr>
</table></td>
</tr>
</table>
</fieldset>
<fieldset id="next-2" style="margin-top:15px;" >
<legend>ADDRESS</legend>
<table border="0" class="tables_fieldset" cellpadding="0" cellspacing="0">
<tr>
<td style="width:50%;"><table cellpadding="0" cellspacing="0" style="width:400px;">
<tr style="height:30px;">
<td>CORRESPONDANCE ADDRESS <span style="color:#F00;font-weight:bold;font-size:1.4em;">*</span></td>
</tr>
<tr>
<td><textarea placeholder="Local Address" name="c_local" id="c_local" style="resize:none;width:99%;" rows="3" class="textboxes"><?php echo $row['c_local']; ?></textarea></td>
</tr>
<tr style="height:10px;">
<td></td>
</tr>
<tr>
<td><input type="text" placeholder=" City" value="<?php echo $row['c_city']; ?>" name="c_city" id="c_city" style="width:100%;" class="textboxes" /></td>
</tr>
<tr style="height:10px;">
<td></td>
</tr>
<tr>
<td><input type="text" placeholder=" District" value="<?php echo $row['c_district']; ?>" name="c_district" id="c_district" style="width:100%;" class="textboxes" /></td>
</tr>
<tr style="height:10px;">
<td></td>
</tr>
<tr>
<td><select class="textboxes" style="width:100%;" name="c_state" id="c_state">
<option value="">--- Select ---</option>
<?php
$prepared_state="select * from shristi_tblstate where status='1' ";
$results = $mysqli -> query($prepared_state);
//$row = $result -> fetch_assoc();
while($state=$results->fetch_assoc()){
if($row['c_state']==$state['StateID']){
$sty='selected';
}else {
$sty='';
}
?>
<option <?php echo $sty;?> value="<?php echo $state['StateID'];?>"><?php echo $state['StateName'];?></option>
<?php }?>
</select></td>
</tr>
<tr style="height:10px;">
<td></td>
</tr>
<tr>
<td><input type="text" placeholder=" Pincode" value="<?php echo $row['c_pincode']; ?>" name="c_pincode" id="c_pincode" onkeypress="return isNumberKey(event)" maxlength="6" style="width:50%;" class="textboxes" /></td>
</tr>
</table></td>
<td><table cellpadding="0" cellspacing="0" style="width:400px;">
<tr style="height:30px;">
<td>PERMANENT ADDRESS <span style="color:#F00;font-weight:bold;font-size:1.4em;">*</span>
<input type="button" value="Copy Correspondance Address" onClick="copy_addr()" /></td>
</tr>
<tr>
<td><textarea placeholder="Local Address" name="p_local" id="p_local" style="resize:none;width:99%;" rows="3" class="textboxes"><?php echo $row['p_local']; ?></textarea></td>
</tr>
<tr style="height:10px;">
<td></td>
</tr>
<tr>
<td><input type="text" placeholder=" City" name="p_city" value="<?php echo $row['p_city']; ?>" id="p_city" style="width:100%;" class="textboxes" /></td>
</tr>
<tr style="height:10px;">
<td></td>
</tr>
<tr>
<td><input type="text" placeholder=" District" name="p_district" value="<?php echo $row['p_district']; ?>" id="p_district" style="width:100%;" class="textboxes" /></td>
</tr>
<tr style="height:10px;">
<td></td>
</tr>
<tr>
<td><select class="textboxes" style="width:100%;" name="p_state" id="p_state">
<option value="">--- Select ---</option>
<?php
$prepared_state="select * from shristi_tblstate where status='1' ";
$results = $mysqli -> query($prepared_state);
//$row = $result -> fetch_assoc();
while($cstate=$results->fetch_assoc()){
if($row['p_state']==$cstate['StateID']){
$sty1='selected';
}else {
$sty1='';
}
?>
<option <?php echo $sty1;?> value="<?php echo $cstate['StateID'];?>"><?php echo $cstate['StateName'];?></option>
<?php }?>
</select></td>
</tr>
<tr style="height:10px;">
<td></td>
</tr>
<tr>
<td><input type="text" placeholder=" Pincode" value="<?php echo $row['p_pincode']; ?>" name="p_pincode" id="p_pincode" onkeypress="return isNumberKey(event)" maxlength="6" style="width:50%;" class="textboxes" /></td>
</tr>
</table></td>
</tr>
</table>
</fieldset>
<fieldset id="next-3" style="margin-top:15px;">
<legend>PROBLEMS & BEHAVIOURS</legend>
<table border="0" class="tables_fieldset" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><table cellpadding="0" cellspacing="0" style="width:100%;">
<tr>
<td style="font-weight:bold;font-size:14px;">PRESENTING PROBLEMS OF THE CHILD <span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:<br>
<textarea name="problem" id="problem" style="width:98%;resize:none;" rows="4"><?php echo $row['problem']; ?></textarea></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" style="font-size:14px;"><br>
<br>
POSTNATAL DEVELOPMENT : </td>
</tr>
<tr>
<td style="width:50%;"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:120px;">Walking</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><select name="walking" id="walking">
<option value="">---</option>
<option <?php if($row['walking']=='10-11') { echo 'selected'; } ?> value="10-11">10-11 months</option>
<option <?php if($row['walking']=='12-13') { echo 'selected'; } ?> value="12-13">12-13 months</option>
<option <?php if($row['walking']=='14-16') { echo 'selected'; } ?> value="14-16" >14-16 months</option>
<option <?php if($row['walking']=='17-20') { echo 'selected'; } ?> value="17-20">17-20 months</option>
</select></td>
</tr>
</table></td>
<td style="width:50%;"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:120px;">First Sentence</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><select name="first_sentence" id="first_sentence">
<option value="">---</option>
<option <?php if($row['first_sentence']=='10-11') { echo 'selected'; } ?> value="10-11">10-11 months</option>
<option <?php if($row['first_sentence']=='12-13') { echo 'selected'; } ?> value="12-13">12-13 months</option>
<option <?php if($row['first_sentence']=='13-15') { echo 'selected'; } ?> value="13-15">13-15 months</option>
<option <?php if($row['first_sentence']=='16-24') { echo 'selected'; } ?> value="16-24">16-24 months</option>
<option <?php if($row['first_sentence']=='not yet') { echo 'selected'; } ?> value="not yet">not yet</option>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" style="font-size:14px;"><br>
<br>
CHILD'S BEHAVIOUR : </td>
</tr>
<tr valign="top">
<td style="width:50%;"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:150px;">Toilet Behaviour</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><select name="toilet_behaviour" id="toilet_behaviour">
<option value="">---</option>
<option <?php if($row['toilet_behaviour']=='Dependent') { echo 'selected'; } ?> value="Dependent" >Dependent</option>
<option <?php if($row['toilet_behaviour']=='Independent') { echo 'selected'; } ?> value="Independent">Independent</option>
</select></td>
</tr>
</table></td>
<td style="width:70%;"><table cellpadding="5px" cellspacing="0">
<tr valign="top">
<td style="font-weight:bold;width:150px;">Self help skills (bathing, eating, dressing, communication skills)</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><select name="self_help" id="self_help">
<option value="">---</option>
<option <?php if($row['toilet_behaviour']=='Dependent') { echo 'selected'; } ?> value="Dependent" >Dependent</option>
<option <?php if($row['toilet_behaviour']=='Independent') { echo 'selected'; } ?> value="Independent">Independent</option>
</select></td>
</tr>
</table></td>
</tr>
<tr valign="top">
<td colspan="2"><table cellpadding="5px" cellspacing="0">
<tr>
<td style="font-weight:bold;width:150px;">Sleeping Pattern</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><select name="sleeping_pattern" id="sleeping_pattern">
<option value="">---</option>
<option <?php if($row['sleeping_pattern']=='Normal') { echo 'selected'; } ?> value="Normal" >Normal</option>
<option <?php if($row['sleeping_pattern']=='Disturbed') { echo 'selected'; } ?> value="Disturbed" >Disturbed</option>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td><table cellpadding="5px" cellspacing="0" style="width:100%;">
<tr>
<td style="font-weight:bold;width:150px;">Play (during free time)</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><select name="play" id="play" style="width:50%;">
<option value="">---</option>
<option <?php if($row['play']=='yes') { echo 'selected'; } ?> value="yes" >Yes</option>
<option <?php if($row['play']=='no') { echo 'selected'; } ?> value="no" >No</option>
</select>
</td>
</tr>
</table></td>
<td ><table cellpadding="5px" cellspacing="0" style="width:100%;">
<tr>
<td style="font-weight:bold;width:150px;">Play group</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td><select name="play_group" id="play_group" style="width:50%;">
<option value="">---</option>
<option <?php if($row['play_group']=='yes') { echo 'selected'; } ?> value="yes" >Yes</option>
<option <?php if($row['play_group']=='no') { echo 'selected'; } ?> value="no" >No</option>
</select>
</td>
</tr>
</table></td>
</tr>
<tr>
</tr>
<tr>
<td><table cellpadding="5px" cellspacing="0" style="width:100%;">
<tr>
<td style="font-weight:bold;width:150px;">Type of play</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td>
<select name="type_of_play" id="type_of_play" style="width:50%;">
<option value="">---</option>
<option <?php if($row['type_of_play']=='Indoor games') { echo 'selected'; } ?> value="Indoor games" >Indoor games</option>
<option <?php if($row['type_of_play']=='outdoor games') { echo 'selected'; } ?> value="outdoor games" >outdoor games</option>
<option <?php if($row['type_of_play']=='indoor as well as outdoor') { echo 'selected'; } ?> value="indoor as well as outdoor" >indoor as well as outdoor</option>
<option <?php if($row['type_of_play']=='All Type') { echo 'selected'; } ?> value="All Type" >All Type</option>
</td>
</tr>
</table></td>
<td colspan="2"><table cellpadding="5px" cellspacing="0" style="width:100%;">
<tr>
<td style="font-weight:bold;width:150px;">Behaviour with family</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td>
<select name="behav_with_family" id="behav_with_family" style="width:50%;">
<option value="">---</option>
<option <?php if($row['behav_with_family']=='normal') { echo 'selected'; } ?> value="normal" >Normal</option>
<option <?php if($row['behav_with_family']=='good') { echo 'selected'; } ?> value="good" >Good</option>
<option <?php if($row['behav_with_family']=='normal but some times aggresive') { echo 'selected'; } ?> value="normal but some times aggresive" >normal but some times aggresive</option>
<option <?php if($row['behav_with_family']=='sads') { echo 'selected'; } ?> value="sads" >Sads</option>
<option <?php if($row['behav_with_family']=='poor') { echo 'selected'; } ?> value="poor" >Poor</option>
</select>
</td>
</tr>
</table></td>
</tr>
<tr>
</tr>
<tr>
<td colspan="2"><table cellpadding="5px" cellspacing="0" style="width:50%;">
<tr>
<td style="font-weight:bold;width:150px;">Relationship with siblings</td>
<td style="width:20px;text-align:right;"><span style="color:#F00;font-weight:bold;font-size:17px;">*</span>:</td>
<td>
<select name="reln_with_siblings" id="reln_with_siblings" style="width:50%;">
<option value="">---</option>
<option <?php if($row['reln_with_siblings']=='normal and emotionally attached') { echo 'selected'; } ?> value="normal and emotionally attached" >Normal and Emotionally attached</option>
<option <?php if($row['reln_with_siblings']=='moderate rivalry') { echo 'selected'; } ?> value="moderate rivalry" >Moderate Rivalry</option>
<option <?php if($row['reln_with_siblings']=='severely affected and emotionally detached') { echo 'selected'; } ?> value="severely affected and emotionally detached" >Severely affected and emotionally detached</option>
</select>
</td>
</tr>
</table></td>
</tr>
</table>
</fieldset>
<br>
<div id="submit-3">
<table>
<tr>
<td><div class="button_div" value="Save" style=" color:#FFF;background-color:#060;cursor:pointer;" onClick="submit_form_save()" />
UPDATE
</div>
<!--<input type="submit" name="sumnit" value="Save Now" />--></td>
</tr>
</table>
<br><br>
</div>
</form>
</div>
</div>
<script>
function submit_form()
{
if($("#child_name").val()=="")
{
alert("Error : Please enter child's name...");
$("#child_name").focus();
return false;
}
if($("#email").val()=="")
{
alert("Error : Please enter Email...");
$("#email").focus();
return false;
}
if($("#age").val()=="")
{
alert("Error : Please select child's age...");
$("#age").focus();
return false;
}
if($("#gender").val()=="")
{
alert("Error : Please select gender");
$("#gender").focus();
return false;
}
if($("#dob_day").val()=="")
{
alert("Error : Please select Day in D.O.B");
$("#dob_day").focus();
return false;
}
if($("#dob_month").val()=="")
{
alert("Error : Please select Month in D.O.B");
$("#dob_month").focus();
return false;
}
if($("#dob_year").val()=="")
{
alert("Error : Please select Year in D.O.B");
$("#dob_year").focus();
return false;
}
if($("#education").val()=="")
{
alert("Error : Please select Education");
$("#education").focus();
return false;
}
if($("#school_name").val()=="")
{
alert("Error : Please enter school name");
$("#school_name").focus();
return false;
}
if($("#contact_no").val()=="")
{
alert("Error : Please select contact no");
$("#contact_no").focus();
return false;
}
if($("#informant").val()=="")
{
alert("Error : Please select informant");
$("#informant").focus();
return false;
}
else
{
$("#next-2").show();
$("#next-1").hide();
$("#submit-1").hide();
$("#submit-2").show();
//return false;
}
}
function submit_form_next()
{
if($("#c_local").val()=="")
{
alert("Error : Please enter local address in 'Correspondance Address'");
$("#c_local").focus();
return false;
}
if($("#c_city").val()=="")
{
alert("Error : Please enter city in 'Correspondance Address'");
$("#c_city").focus();
return false;
}
if($("#c_district").val()=="")
{
alert("Error : Please enter district in 'Correspondance Address'");
$("#c_district").focus();
return false;
}
if($("#c_state").val()=="")
{
alert("Error : Please select state in 'Correspondance Address'");
$("#c_state").focus();
return false;
}
if($("#c_pincode").val()=="")
{
alert("Error : Please enter pincode in 'Correspondance Address'");
$("#c_pincode").focus();
return false;
}
if($("#p_local").val()=="")
{
alert("Error : Please enter local address in 'Permanent Address'");
$("#p_local").focus();
return false;
}
if($("#p_city").val()=="")
{
alert("Error : Please enter city in 'Permanent Address'");
$("#p_city").focus();
return false;
}
var p_city=$("#p_city").val();
if(p_city.length<3)
{
alert("Error : City in 'Permanent Address' must be 3 characters long");
$("#p_city").focus();
return false;
}
if($("#p_district").val()=="")
{
alert("Error : Please enter district in 'Permanent Address'");
$("#p_district").focus();
return false;
}
if($("#p_state").val()=="")
{
alert("Error : Please select state in 'Permanent Address'");
$("#p_state").focus();
return false;
}
if($("#p_pincode").val()=="")
{
alert("Error : Please enter pincode in 'Permanent Address'");
$("#p_pincode").focus();
return false;
}else {
$("#next-3").show();
$("#next-2").hide();
$("#submit-2").hide();
$("#submit-3").show();
}
}
function submit_form_save()
{
if($("#problem").val()=="")
{
alert("Error : Please enter 'PRESENTING PROBLEM OF THE CHILD'");
$("#problem").focus();
return false;
}
if($("#walking").val()=="")
{
alert("Error : Please select walking");
$("#walking").focus();
return false;
}
if($("#first_sentence").val()=="")
{
alert("Error : Please select first sentence");
$("#first_sentence").focus();
return false;
}
if($("#toilet_behaviour").val()=="")
{
alert("Error : Please select 'Toilet Behaviour'");
$("#toilet_behaviour").focus();
return false;
}
if($("#self_help").val()=="")
{
alert("Error : Please select 'Self help skills'");
$("#self_help").focus();
return false;
}
if($("#sleeping_pattern").val()=="")
{
alert("Error : Please select 'Sleeping Pattern'");
$("#sleeping_pattern").focus();
return false;
}
if($("#play").val()=="")
{
alert("Error : Please enter 'Play (during free time)'");
$("#play").focus();
return false;
}
if($("#play_group").val()=="")
{
alert("Error : Please enter 'Play Group'");
$("#play_group").focus();
return false;
}
if($("#type_of_play").val()=="")
{
alert("Error : Please enter 'Type of Play'");
$("#type_of_play").focus();
return false;
}
if($("#behav_with_family").val()=="")
{
alert("Error : Please enter 'Behaviour with Family'");
$("#behav_with_family").focus();
return false;
}
if($("#reln_with_siblings").val()=="")
{
alert("Error : Please enter 'Relationaship with Siblings'");
$("#reln_with_siblings").focus();
return false;
}
var ans=confirm("Are you sure you want to continue?");
if(ans==true)
{
document.myform.submit();
}
else
{
return false;
}
}
function copy_addr()
{
$("#p_local").val($("#c_local").val());
$("#p_city").val($("#c_city").val());
$("#p_district").val($("#c_district").val());
$("#p_state").val($("#c_state").val());
$("#p_pincode").val($("#c_pincode").val());
}
</script>
</body>
</html>