No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
Hello, I have write a simple search page for my sit(testing!) Now I am trying to highlight my search keyword from the search result. Not going to use java so I am thinking to use something like preg_replace But the problem is I dont where should I start with. As … |
|
<html> <body> <h2>Search</h2> <form name="search" method="post" action="<?=$PHP_SELF?>"> Search for: <input type="text" name="find" /> <input type="hidden" name="searching" value="yes" /> <input type="submit" name="search" value="Search" /> </form> <? //This is only displayed if they have submitted the form $find = $_POST['find']; $searching = $_POST['searching'] ; if ($searching =="yes") { echo "<h2>Results</h2><p>"; //If they … |