Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/icure/staff/
Upload File :
Current File : /var/www/html/mmishra/icure/staff/zz.php

<html>
<head>
<title>Get Student name</title>
<link href='../css/style.css' rel='stylesheet' />
<script language='javascript'>
<!--
function changeparent(elmnt,vlu) {
        window.opener.document.getElementById(elmnt).value=vlu;
}
-->
</script>
</head>
<body>
<body>
<h3 align='left'>Get Student Name</h3>
<form method='POST' action='students.php'>

<?php

include "../session.inc";

$tbl = 'students';
$rno = $_REQUEST["rno"];

?>

Student RollNo <input type='text' name='rno' value='<?php echo $rno; ?>' size='20'>
<input type='submit' name='submit' value='FIND'>
<br><br>

<?php

//if ($_POST["submit"] == 'FIND' && $rno) {

	echo "<table style='font-size: x-small' border='1' width='100%'>
	<tr><th>Sr</th><th>RollNo</th><th>Student Name</th><th>Address</th><th>Contact</th><th>Email</th><th>Accommodation</th></tr>";

	$hno = ''; $rmo = '';
	$rs = mysql_query("select * from $tbl order by roll_no");
	while ($o = mysql_fetch_object($rs)) {
		$rno = strtoupper(trim($o->roll_no));
		
		$sr = mysql_query("select * from TABLE25 where ucase(rno) = '$rno'");
		if (mysql_num_rows($sr)) {
			$q = mysql_fetch_object($sr);
			$hno = $q->Hostel;
			$rmo = $q->Room;

			mysql_query("update $tbl set hostel_no='$hno', room_no='$rmo' where roll_no='$rno'");
		} else {
			$hno = '.';
			$rmo = '.';
		}
		$i++;
		echo "<tr><td align='center'>$i</td>
		<td><a href='javascript:void(0);' onclick=\"changeparent('patid','$rno');\">$rno</a></td>
		<td>$o->name_eng</td>
 		<td>$o->communication_address_1</td>
		<td>$o->contact</td>
		<td>$rno@iiita.ac.in</td>
		<td>$hno / $rmo</td>
		</tr>";
	}
	echo "</table>";
//}

?>

</form>
</body>
</html>