Hi, I want to create search functionality

1> create 2 radio button
i>artical
ii>Wikipedia

when user check radio button artical and search it shows artical in website
and when for check radio button Wikipedia it searches result from Wikipedia and display in site...

How to do this ??
sample example or link??

hi this is nathen,

I think max this will solve your problem,

<table><th><strong>SEARCH BY EMPLOYEE ID</strong></th></table>
<form  method="post"  action="" >
<strong>PLEASE ENTER EMPLOYEE ID:</strong><table><tr><td><input type="text" id="text" name="text" size="30"/></td><td align="center"><input type="submit" id="search" value="search" size="10" /></td></tr></table>
</form> 
<?php
error_reporting(0);
mysql_connect("localhost","root","rootwdp");
mysql_select_db("been") or die("unable to select");
$id=$_REQUEST["text"];
//$dd="SELECT *FROM `jos_employee`WHERE emp_id =184" ;$que=mysql_query($dd);$row=mysql_fetch_row($que);
$result = mysql_query("SELECT * FROM `jos_employee` WHERE emp_id=".$id);
while($row = mysql_fetch_array($result))
  {
  ?>
  <table width="100%" bgcolor="#CDE3EE" border="0" cellpadding="0" cellspacing="0" class="bodyline">
         <tr>
            <td height="180" align="center" valign="middle">
		   
		   	<table  width="95%" border="0" cellpadding="0" cellspacing="0" class="bodyline1">
			   <tr>
				<td><strong>Employee Id</strong> :</td>
				<td><?php echo $row[1];?></td>
			   </tr>
			   <tr>
				<td><strong>Name</strong> :</td>
				<td ><?php echo $row[0];?></td>
			   </tr>
			   <tr>
				<td><strong>Designation </strong>:</td>
				<td><?php echo $row[2];?></td>
			   </tr>
			   <tr>
				<td><strong>Date Of Join</strong> :</td>
				<td><?php echo $row[3];?></td>
			   </tr>
			   <tr>
				<td><strong>Contact  No</strong> :</td>
				<td><?php echo $row[5];?></td>
			   </tr>
			    <?php 
		   		   $query="SELECT * FROM jos_teams where team_id=".$row[9];
		           $rr=mysql_query($query);
		   while($res=mysql_fetch_row($rr))
		   {
		   ?>  <tr>
				<td><strong>Project Name</strong> :</td>
				<td><?php echo $res[1];?></td>
			   </tr><?php } ?>
			   <tr>
			   <tr>
				<td><strong>Experience</strong> :</td>
				<td><?php echo $row[4];?></td>
			   </tr>
			  
		  </table>
		 </td>
		 <td>
		  <table width="95%" border="0" cellpadding="0" cellspacing="0" class="bodyline1">
               <tr>
				<td  ><img src="http://localhost/been/<?php echo $row[6];?>" /></td>
			  </tr>
		  </table>
		</td>
	  </tr>
	  <tr>
			<td  ><strong>Remarks</strong> :</td>
			<td  ><?php echo $row[7];?></td>
	  </tr>
	</table>
	<?php 
     }
?>
<?php

mysql_connect("localhost","root","rootwdp");
mysql_select_db("been") or die("unable to select");
$id=$_REQUEST["text"];
//$dd="SELECT *FROM `jos_employee`WHERE emp_id =184" ;$que=mysql_query($dd);$row=mysql_fetch_row($que);
$ss="SELECT * FROM `jos_employee` WHERE name LIKE '".$id."%'";

$result = mysql_query($ss);
while($row = mysql_fetch_row($result))
  {
  ?>
  <table width="100%" bgcolor="#CDE3EE" border="0" cellpadding="0" cellspacing="0" class="bodyline">
         <tr>
            <td height="180" align="center" valign="middle">
		   
		   	<table  width="95%" border="0" cellpadding="0" cellspacing="0" class="bodyline1">
			
			   <tr>
				<td><strong>Employee Id</strong> :</td>
				<td><?php echo $row[1];?></td>
			   </tr>
			   <tr>
				<td><strong>Name</strong> :</td>
				<td ><?php echo $row[0];?></td>
			   </tr>
			   <tr>
				<td><strong>Designation </strong>:</td>
				<td><?php echo $row[2];?></td>
			   </tr>
			   <tr>
				<td><strong>Date Of Join</strong> :</td>
				<td><?php echo $row[3];?></td>
			   </tr>
			   <tr>
				<td><strong>Contact  No</strong> :</td>
				<td><?php echo $row[5];?></td>
			   </tr>
			    <?php 
		    $query="SELECT * FROM jos_teams where team_id=".$row[9];
		           $rr=mysql_query($query);
		   while($res=mysql_fetch_row($rr))
		   {
		   ?>  <tr>
				<td><strong>Project Name</strong> :</td>
				<td><?php echo $res[1];?></td>
			   </tr><?php } ?>
			   <tr>
			   <tr>
				<td><strong>Experience</strong> :</td>
				<td><?php echo $row[4];?></td>
			   </tr>
			  
		  </table>
		 </td>
		 <td>
		  <table width="95%" border="0" cellpadding="0" cellspacing="0" class="bodyline1">
               <tr>
				<td  ><img src="http://localhost/been/<?php echo $row[6];?>" /></td>
			  </tr>
		  </table>
		</td>
	  </tr>
	  <tr>
			<td><strong>Remarks</strong> :</td>
			<td><?php echo $row[7];?></td>
	  </tr>
</table>
	<?php 
           }


?> 
<br/>
<form  method="post" name="fff" id="fff" >
<table><th><strong>SEARCH BY EMPLOYEE NAME</strong></th></table>
<strong><strong>PLEASE ENTER EMPLOYEE NAME:</strong></strong>
<table><tr><td><input type="text" id="text" name="text" size="30"/></td><td><input type="submit" id="search" value="search" size="10" /></td></tr></table>
</form>
This article has been dead for over six months. Start a new discussion instead.