I have a mySQL database having two fields... Name and Phone..
I have a form as here
<table>
<form name="searchform" action="" method="post" >
<tr>
<td><input name="sword" type="text" size="30"></td>
<td><select name="catmenu">
<option value="name" selected>By Name</option>
<option value="phone">By Number</option>
</select>
</td>
<td>
<input type="submit" name="Submit" value="Search">
</td>
</tr>
</form>
</table>
I want to setup a search for both fields. If the user select Name the results should be from Name field and same for Phone field.
The exact mactch is not required. I need any record containing the search key.... Plese help