| Current Path : /var/www/html/mmishra/iws8/html/indem/webbioexam/biomedical/ |
| Current File : /var/www/html/mmishra/iws8/html/indem/webbioexam/biomedical/find.php |
<?php
include "header.inc";
$tbl = 'tbl_registration';
$id = $_REQUEST["id"];
$fullname = $_REQUEST["fullname"];
$remoteip = $_SERVER["REMOTE_ADDR"];
/*if ($id && $_REQUEST["edit"] == 1) {
include "findindex.php";
} else if ($_POST["submit"] == "FIND") {
header("Location: appformreprint.php?id=$id&dob=$dob1");
}
*/
if ($_POST["submit"] == "DELETE") {
mysql_query("delete from $tbl where id=$id");
//$id = 0;
}
if ($_POST["submit"] == "FIND") {
$rs = mysql_query("select * from $tbl where fullname like '%$fullname%'");
echo "<table border='1' width='100%'><ttitle>Existing Applications</ttitle>
<tr><th>Application No.</th><th>Fullname</th><th>DOB</th><th>S/o</th><th>Address</th><th>Phone</th></tr>";
while ($o = mysql_fetch_object($rs)) {
$id = $o->id;
$fullname = $o->fullname;
$dob = $o->dob;
$gender = $o->gender;
$fathername = $o->fathername;
$mothername = $o->mothername;
$address = $o->address;
$state = $o->state;
$pincode = $o->pincode;
$phone = $o->phone;
echo "<tr><td>$id</td>
<td>$o->fullname</td><td>$o->dob</td><td>$o->fathername</td><td>$o->address</td><td>$o->phone</td></tr>";
}
echo "</table>";
break;
} else if ($id) {
//include "fetchrecord.inc";
include "findindex.php";
}
if ($_POST["submit"] == "SAVE") {
$msg = "";
$fullname = $_POST["fullname"];
if (!$fullname) $msg = "Please enter your name";
$dob = $_POST["dob"];
if (!$dob) $msg = "Please enter your correct date of birth";
$gender = $_POST["gender"];
if (!$gender) $gender = 'Male';
$nationality = $_POST["nationality"];
if (!$nationality) $msg = "Please enter your nationality";
$category = $_POST["category"];
if (!$category) $category = 'GE';
$fathername = $_POST["fathername"];
if (!$fathername) $msg = "Please enter your father name";
$mothername = $_POST["mothername"];
if (!$mothername) $msg = "Please enter your mother name";
$address = $_POST["address"];
if (!$address) $msg = "Please enter your address";
$state = $_POST["state"];
$pincode = $_POST["pincode"];
if (!$pincode) $msg = "Please enter pin code";
$phone = $_POST["phone"];
$fax = $_POST["fax"];
$email = $_POST["email"];
$txntype = $_POST["txntype"];
$txnnumber = $_POST["txnnumber"];
if (!$txnnumber) $msg = "Please enter the DD/Cash Receipt No.";
$amount = $_POST["amount"];
if (!$amount) $amount = "1000";
$depositdate = $_POST["depositdate"];
//if (!$depositdate || $depositdate == '0000-00-00 00:00:00') $depositdate = date('y-m-d');//date('Y-m-d');
$bankbranch = $_POST["bankbranch"];
$discipline12 = $_POST["discipline12"];
$board12 = $_POST["board12"];
$year12 = $_POST["year12"];
$percentage12 = $_POST["percentage12"];
$appearing12 = $_POST["appearing12"];
$discipline10 = $_POST["discipline10"];
$board10 = $_POST["board10"];
$year10 = $_POST["year10"];
$percentage10 = $_POST["percentage10"];
$appearing10 = $_POST["appearing10"];
$photo = $_FILES["photo"];
/* if ($msg) {
echo "<center><font size=4px color='red'>$msg</font></center>";
} else {
if (mysql_num_rows(mysql_query("select * from $tbl where id=$id"))) {
mysql_query("update $tbl set fullname='$fullname',
dob='$dob', gender='$gender', nationality='$nationality', category='$category', fathername='$fathername',
mothername='$mothername', address='$address', state='$state', pincode='$pincode', phone='$phone', fax='$fax', email='$email',
txntype='$txntype', txnnumber='$txnnumber', amount='$amount', depositdate='$depositdate', bankbranch='$bankbranch',
discipline12='$discipline12', board12='$board12', year12='$year12', percentage12='$percentage12', appearing12='$appearing12',
discipline10='$discipline10', board10='$board10', year10='$year10', percentage10='$percentage10', appearing10='$appearing10',
date_modification=now(), remoteip='$remoteip' where id=$id");
} else {
mysql_query("insert into $tbl(fullname,dob,gender,nationality,category,fathername,mothername,address,state,pincode,
phone,fax,email,txntype,txnnumber,amount,depositdate,bankbranch,discipline12,board12,year12,percentage12,appearing12,
discipline10,board10,year10,percentage10,appearing10,status,date_creation,date_modification,remoteip)
values('$fullname','$dob','$gender','$nationality','$category','$fathername','$mothername','$address','$state','$pincode',
'$phone','$fax','$email','$txntype','$txnnumber','$amount','$depositdate','$bankbranch','$discipline12','$board12','$year12',
'$percentage12','$appearing12','$discipline10','$board10','$year10','$percentage10','$appearing10',
'Pending',now(),now(),'$remoteip')");
$id = mysql_insert_id();
}
if ($photo) {
$photo = upload_file($id);
mysql_query("update $tbl set photo='$photo' where id=$id");
}
// header("Location: appform.php?id=$id");
echo "<center><font color='red'><b>Application No. ".$id."</b></font></center>";
}
*/
}
echo "<input type='hidden' name='id' value='$id'>
<table width='100%'>
<tr><td>
<table>
<tr><td width=20%>Full Name </td><td width=80%> <input type='text' onkeypress='return isCharacterKey(event)' name='fullname' size='50' maxlength='50' value='$fullname'> <input type='submit' name='submit' value='FIND'> </td></tr>
</table>
";
?>
<br>
<b>After filling online registration form please take a printout of your submitted registration details and keep the registration no. for further communication. </b><br>
* Scanned copy of Photograph can be uploaded on the online application form.<br>
# Attach attested copies of certificates, marks sheet etc. See information brochure for certificates required.<br>
<?php
include "footer.inc";
?>