Creating a search "box" for a website???

liunx

Guest
Do you have any idea about how would be the best way<br />
to enter data like church addresses?<br />
I want to be able to have a HOME PAGE with a link to a<br />
CHURCH SEARCH PAGE then be able to search the site<br />
several different ways from that page. 1. Search by<br />
Church name 2. Search by Pastor name 3. Search by<br />
State, etc. I'm not sure if I need to have a page for<br />
each individual church or put data in individual<br />
tables or insert something out of Microsoft works. I'm<br />
not sure how the search engine works and how it<br />
retrieves and displays the required info. <br />
<br />
<br />
Thx,<br />
<br />
-Joe<!--content-->you need some kind of server side script to handle the actual searching of information.<br />
<br />
For the input box itself, you would use a form with a text input and an OK button. If you want to be able to select certain criteria, then you could use a select input or radiobuttons as well.<br />
<br />
Depending on how you set the form up, the contents of the seach box go to the server, which can be processed and a results page can be drawn up from it.<br />
<br />
Here are some links:<br />
<br />
<form> (<!-- m --><a class="postlink" href="http://www.htmlhelp.com/reference/html40/forms/form.html">http://www.htmlhelp.com/reference/html4 ... /form.html</a><!-- m -->) <br />
<br />
<input> (<!-- m --><a class="postlink" href="http://www.htmlhelp.com/reference/html40/forms/input.html">http://www.htmlhelp.com/reference/html4 ... input.html</a><!-- m -->) <br />
<br />
PHP - Server Side Script (<!-- m --><a class="postlink" href="http://www.php.net/">http://www.php.net/</a><!-- m -->) <br />
<br />
<br />
Have a go, and come back and ask for more if you need to.<br />
<br />
Cheers,<br />
HK<!--content-->heres a PHP script I use to search fields from a database.<br />
first the user selects a field then enters a parameter then submits the query. i'm new to HTML/PHP so it might be a little rough.<br />
<br />
<form method="post" action="searchBYField2.php"><br />
<tr> <br />
<td width="36%">&nbsp;</td><br />
<td width="31%">&nbsp;</td><br />
<td width="33%">&nbsp;</td><br />
</tr><br />
<tr> <br />
<td>Choose field to search:</td><br />
<td><select style='width:150px' name="SField" size="1" ><br />
<?php<br />
$connection = mysql_connect("localhost", "user", "pword");<br />
<br />
mysql_select_db("HelpData", $connection);<br />
$FLDquery= "show columns from tblWorkstation ";<br />
$result = mysql_query($FLDquery, $connection) ;<br />
print("<option selected> </option>");<br />
while ($row = mysql_fetch_row($result))<br />
<br />
{ <br />
<br />
print("<option > $row[0]</option>");<br />
<br />
} <br />
?><br />
</select></td><br />
<td>&nbsp;</td><br />
</tr><br />
<tr> <br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
<td>&nbsp;</td><br />
</tr><br />
<tr> <br />
<td>Enter Parameters for Search:</td><br />
<td><input name="Parameter" type="text" size="48" align="left"></td><br />
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="Search" type="Submit" align="right"></td><br />
</tr><br />
</form><br />
</table><!--content-->
 
Back
Top