Web Analytics Made Easy -
StatCounter search result display page modification - CodingForum

Announcement

Collapse
No announcement yet.

search result display page modification

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • search result display page modification

    HI, I am new to this php coding forum. i have a bit of code that i want help with.

    I am attaching the searchtemplate.php file here. I have to do change so that when the search results are displayed, if the user has not found what he was searching for, he must be greeted with a message in html. Suppose i was searching for "mango" if i dont get mango, i will be told at search results display page to redefine search(as usually it is). What i want is to display a message too when user searches through a search box ( the code of which I am writng here). I have been asked to modify results function in searchtemplate.php . I have not figured it out yet.

    I am complete novice in php. NAy guidance or help is appreciated. If anybody can just help me out where should i make a modification.

    TIA

    code of the search box that user searches through
    echo '<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
    <div class="sp_center">
    <input type="text" name="search" value="" class="sp_search" /><br /><br />
    <input type="submit" name="submit" value="Search" />
    <input type="hidden" name="advanced" value="0" />
    <input type="hidden" name="brd[2]" value="2" />';


    for the code..

    it is a php block of code that i use to display a search box to the users to search through a particular board. brd[2] and the value="2" are for the respective board. (board is just same as sub forum in your forum)

    i have attached the searchtemplate too.

    It is in .txt format
    Attached Files
Working...
X