Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/indem/phq/
Upload File :
Current File : /var/www/html/mmishra/indem/phq/search_results.php

<?php
include 'db.php';
$link = dbConnect();
$tbl = 't_recruitment';
$myvalue = $_REQUEST['myvalue'];
$myfield = $_REQUEST['myfield'];
echo "<b>Search Results</b><hr>";
if (isset($_REQUEST['myvalue']) && strlen($_REQUEST['myvalue'])>2){
  $rs = mysql_query("select * from $tbl where " .$myfield. " like '" . $myvalue . "%'", $link);
  if (mysql_num_rows($rs) > 1){
    echo "<table width='100%'>";
    while ($o = mysql_fetch_object($rs)){
      $i++;
      echo "<tr valign='top'><td><img src='photographs/" . $o->pno . ".jpg' width='50' height='50'></td>";
      echo "<td>$i) PNo.: <a href='index.php?url=search_english&myfield=pno&myvalue=" . $o->pno . "'>" . $o->pno . "</a> ";
      //echo "<li><a href='/' onclick=\"show_names('PNO',$o->pno); return false;\">" . $o->pno . "</a> - ";
      echo "&nbsp;(DOB:&nbsp;" . $o->date_of_birth . ")<br>";
      echo "<span id='hindi'>" . $o->full_name . "</span> (" . $o->full_name_e . ")<br>";
      if ($o->sex == 'L=h') echo "D/o."; else echo "S/o.";
      echo "<span id='hindi'>" . $o->father_name . "</span> (" . $o->father_name_e . ")</td>";
      echo "<td>Designation: <span id='hindi'>" . $o->designation . "</span><br>";
      echo "Unit-District:  <span id='hindi'>" . $o->unit . "-" . $o->district . "</span><br>";
      echo "Range-Zone: <span id='hindi'>" . $o->range . "-" . $o->zone . "</span></td></tr>";
    }
    echo "</table>";
  }elseif (mysql_num_rows($rs) == 1){
    include 'search_result.php';
  }else{
    echo "Record not found for $myfield like $myvalue";
  }
}
?>