# Search not found

**URL:** <https://forum.kirupa.com/t/search-not-found/40477>\
**Category:** Uncategorized\
**Created:** [January 19, 2004, 2:54am UTC](https://forum.kirupa.com/t/search-not-found/40477 "2004-01-19T02:54:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashroiem](https://avatars.discourse-cdn.com/v4/letter/f/a3d4f5/32.png) [@flashroiem](https://forum.kirupa.com/u/flashroiem)\
**Post date:** [January 19, 2004, 2:54am UTC](https://forum.kirupa.com/t/search-not-found/40477/1 "2004-01-19T02:54:00Z")

</div>

I have a search within a site form. My problem is as I searched a keyword this message appears instead

Search results for : ‘aids’

The term ‘aids’ was not found in any file

Also, my search box only appears on my main page (php file) while the rest (html pages) search box does not appear.

I’m using Apache 1.3.x and Php 4.3 version on win XP Prof.

I have this code on my search box

\<?  
search\_form($HTTP\_GET\_VARS, $\_SERVER[‘PHP\_SELF’]);  
?\>  
\</td\>  
\</tr\>  
\</table\>

\<font size=“1” face=“Verdana, Arial, Helvetica, sans-serif”\>  
\<?

@$keyword=$HTTP\_GET\_VARS[‘keyword’];  
@$action=$HTTP\_GET\_VARS[‘action’];  
if ($action==“SEARCH”) {  
search\_results\_title($HTTP\_GET\_VARS);  
search\_keyword\_length\_check($HTTP\_GET\_VARS);  
search\_files($server\_name, ‘c://inetpub//wwwroot//’,  
$search\_dir, $file\_types, $file\_skip, $file\_hits, $file\_terms, $file\_bytes, $HTTP\_GET\_VARS);  
search\_no\_hits($HTTP\_GET\_VARS, $count\_hits); }  
else {

?\>

search.inc code:

//search\_form():  
function search\_form($HTTP\_GET\_VARS, $PHP\_SELF)  
{  
@$keyword=$HTTP\_GET\_VARS[‘keyword’];  
echo  
“\<form action=”$PHP\_SELF" method=“GET”\>  
“,  
“\<input type=“hidden” value=“SEARCH” name=“action”\>  
“,  
“\<input type=“text” name=“keyword” size=“12” maxlength=“40” value=””;  
if(!$keyword)  
echo “”; //Default text in search field  
else  
echo str\_replace(”&”,"&",htmlentities($keyword));  
echo “” “;  
echo “onFocus=” if (value == '”;  
if(!$keyword)  
echo “”; //Default text in search field  
else  
echo str\_replace("&","&",htmlentities($keyword));  
echo “’) {value=’’}” onBlur=“if (value == ‘’) {value=’”;  
if(!$keyword)  
echo “Search”;  
else  
echo str\_replace("&","&",htmlentities($keyword));  
echo “’}”\> ";  
echo  
"\<input type=“submit” value=“Find”\>  
",  
"\<br\>  
",  
"\</form\>  
";

}

hope you could fix it.

thanks in advanced!!!  
flashroiem
