<table >
 <tr> <td width="673" align="center" valign="top"><img src = "img1.jpg" name = 'SlideShow' width = 670 height = 249 border="0"></td></tr>
  <tr>
    <td height="19" align="left" valign="top">
    <div align="justify" class="style5">
      <h2 align="left"> 
            Your Search Results:</h2>
      <form action="searchfeed.php" method="post" name="searchform" id="searchform" onSubmit = "return check_fields(this)";  >

        <table width="654" border="0" cellpadding="0" cellspacing="0" align="center">
        <tr>
          <td width="121" align="center"><span class="style1">Institution Name</span></td>
          <td width="250" valign="top" align="center"><input name="searchname" type="text" id="search" value= "" size="30" style = "border: 1px solid outset #00CCFF; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; font-weight:bold" ></td>
          <td width="283" align="left" valign="top"><input name="searchbtn" type="submit" id="searchbtn" value="Search" style = "border: 1px solid outset #00CCFF; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:8px; font-weight:bold; cursor:hand; width:110px"></td>
        </tr>
      </table>
      </form>    </td>
  </tr>
  <tr>
    <td height="19" align="left" valign="top">
      <p><br>

      <?php 
//Connect to DB 
mysql_connect("localhost","root","") or die("Unable to connect to SQL server"); 
mysql_select_db("schooldb") or die("Unable to SELECT DB"); 

$Limit = 2; //Number of results per page 
$SearchString=$_POST["searchname"]; // Get the search tearm 

If($SearchString == "")
 $SearchString=$_GET["searchname"]; // Get the search tearm 

If($SearchString == "") { 
Echo"Please type text to search for..."; 
exit(); 
} 

$page=$_GET["page"]; //Get the page number to show 
If($page == "") $page=1; //If no page number is set, the default page is 1 

//Get the number of results 
$SearchResult=mysql_query("SELECT * FROM schooltb WHERE name LIKE '%$SearchString%' ORDER BY serial_no") or die(mysql_error()); 
$NumberOfResults=mysql_num_rows($SearchResult); 

//Get the number of pages 
$NumberOfPages=ceil($NumberOfResults/$Limit); 

$SearchResult=mysql_query("SELECT * FROM schooltb WHERE name LIKE '%$SearchString%' ORDER BY serial_no LIMIT " . ($page-1)*$Limit . ",$Limit") or die(mysql_error()); 


While($row = mysql_fetch_object($SearchResult)) 
{ 
//Echo $row->name . "<BR>"; 

    ?><br> 
  </p>
<table width="612" height="361" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="100" rowspan="13" align="left" valign="top" ><span class="style13">
<img src = "<?php echo $row->path2; ?>" width="100" height="100" border=0  /></span><br>
center>Your Logo </center> 
              <!-- logo --></td>
              <td width="134" height="19" align="left" valign="top" class="style1">Name of Institution </td>
              <td colspan="3" align="left" valign="top" class="style13"><label><?php echo $row->name;?></label></td>
            </tr>
            <tr>
              <td height="33" align="left" valign="top" class="style1">Address </td>
              <td colspan="3" align="left" valign="top" class="style13"><label><?php echo $row->address;;?></label></td>
            </tr>
            <tr>
              <td height="19" align="left" valign="top" class="style1">City</td>
              <td colspan="3" align="left" valign="top" class="style13"><?php echo $row->city; ?></td>
            </tr>
            <tr>
              <td height="17" align="left" valign="top" class="style1">PTCL City Code No.</td>
              <td width="123" align="left" valign="top" class="style13"><label><?php echo $row->citycode;?></label></td>
              <td width="92" align="left" valign="top" class="style1">PTCL Phone No. </td>
              <td width="163" align="left" valign="top" class="style13"><label><?php echo $row->ptclno;?></label></td>
            </tr>
            <tr>
              <td height="19" align="left" valign="top" class="style1">Sector</td>
              <td align="left" valign="top" class="style13"><label><?php echo $row->sector;?></label></td>
              <td align="left" valign="top" class="style1">Study Level </td>
              <td align="left" valign="top" class="style13"><label><?php echo $row->level;?></label></td>
            </tr>
            <tr>
              <td height="19" align="left" valign="top" class="style1">Language</td>
              <td align="left" valign="top" class="style13"><label><?php echo $row->language;?></label></td>
              <td align="left" valign="top" class="style1">Education Type </td>
              <td align="left" valign="top" class="style13"><label><?php echo $row->edutype;?></label></td>
            </tr>
            <tr>
              <td height="19" align="left" valign="top" class="style1">Affiliated with </td>
              <td colspan="3" align="left" valign="top" class="style13"><?php echo $row->affiliated;?></td>
            </tr>
            <tr>
              <td height="19" align="left" valign="top" class="style1">Em@il 
              (Optional)</td>
              <td colspan="3" align="left" valign="top" class="style1"><label><a href="mailto:<?php echo $row->email_address;?>" class="style1"><?php echo $row->email_address;?></a></label></td>
            </tr>
            <tr>
              <td height="19" align="left" valign="top" class="style1">Web URL (Optional)</td>
              <td colspan="3" align="left" valign="top" class="style1"><label><a href="http://<?php echo $row->weburl;?>" class="style1" target=_new><?php echo $row->weburl;?></a></label></td>
            </tr>
            <tr>
              <td height="19" align="left" valign="top" class="style1">Transport Route</td>
              <td colspan="3" align="left" valign="top" class="style13"><?php echo $row->transport;?></td>
            </tr>
            <tr>
              <td height="19" align="left" valign="top" class="style1"><u><span class="style12" ><font onmouseover="Tip('In Corel Draw, draw the area where your institution exists <BR> <img src=locationmap.jpg height=200 width=200 border=0 >', FADEIN, 1000, FADEOUT, 1000, PADDING, 10, TITLE, 'Location Map', FONTFACE, 'verdana', TEXTALIGN, 'center', FONTWEIGHT, 'bold', WIDTH, 300, HEIGHT, 250, STICKY, true);" onmouseout="UnTip()" >Location Map * </font> </span></u></td>
              <td colspan="3" align="left" valign="top" class="style1"><label>
               <img src = "<?php echo $row->path;?>" width="150" height="120" border=0 onMouseOver="Tip('<?php echo $row->name;?> <BR><img src=<?php echo $row->path;?>  width=330 height=280 border=0>', FADEIN, 1000, FADEOUT, 1000, PADDING, 10, TITLE, 'Location Map', FONTFACE, 'verdana', TEXTALIGN, 'center', FONTWEIGHT, 'bold',  WIDTH, 345, HEIGHT, 300);" onMouseOut="UnTip()"/>
              </label></td>
            </tr>
            <tr>
              <td height="19" colspan="4" align="left" valign="top" class="style1">&nbsp;</td>
            </tr>
            <tr>
              <td height="19" colspan="4" align="left" valign="top" class="style1">&nbsp;</td>
            </tr>
</table>

<div align="center" class="pagination">
  <?php

} 

$Nav=""; 

If($page > 1) 
{ 
$Nav .= "<A HREF=\"searchfeed.php?page=" . ($page-1) . "&searchname=" .urlencode($SearchString) . "\"> Prev </A>"; 
} 

For($i = 1 ; $i <= $NumberOfPages ; $i++) 
{ 
    If($i == $page) 
    { 
    $Nav .= "&nbsp;<span class=\"current\"><B> $i </B></span>&nbsp;"; 
    }
    else
    { 
    $Nav .= "<A HREF=\"searchfeed.php?page=" . $i . "&searchname=" .urlencode($SearchString) . "\" > $i </A>"; 
    } 
} 

If($page < $NumberOfPages) 
{ 
$Nav .= "<A HREF=\"searchfeed.php?page=" . ($page+1) . "&searchname=" .urlencode($SearchString) . "\" > Next </A>"; 
} 

Echo "<BR><BR>" . $Nav. "<BR><BR>"; 
    echo "<font class=style1>" . mysql_num_rows($SearchResult). " Record(s) Founded on This Page </font><br> ";

?> 
</div>
</p>
</table>
For This Search Result Display Code of PHP Pagewise using textbox this is the Style sheet file please note it carefully:

div.pagination {padding: 1px;margin: 1px;}
div.pagination a {padding: 1px 2px 1px 2px; margin: 1px; border: 1px solid #AAAADD; text-decoration: none; font-size: 12px; color: #000099;}

div.pagination a:hover, div.pagination a:active {border: 1px solid #000099; color: #000;}

div.pagination span.current {padding: 1px 2px 1px 2px; margin: 1px; border: 1px solid #000099; font-weight: bold; font-size: 12px;background-color: #000099;color: #FFF;}

div.pagination span.disabled {padding: 1px 2px 1px 2px;margin: 1px;border: 1px solid #EEE;font-size: 12px;color: #DDD;}

please remove from the above display code these lines:


onSubmit = "return check_fields(this)";

onmouseover="Tip('In Corel Draw, draw the area where your institution exists <BR> <img src=locationmap.jpg height=200 width=200 border=0 >', FADEIN, 1000, FADEOUT, 1000, PADDING, 10, TITLE, 'Location Map', FONTFACE, 'verdana', TEXTALIGN, 'center', FONTWEIGHT, 'bold', WIDTH, 300, HEIGHT, 250, STICKY, true);" onmouseout="UnTip()"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.