Skip to content

Commit

Permalink
Update search.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rickbot-dot authored Jul 29, 2023
1 parent 3d33143 commit f23340d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions search.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Get the search term from the form
$search = mysqli_real_escape_string($conn, $_POST["search"]);
$search_no_spaces = str_replace(' ', '', $search);

// Ensure that the user provided a search query to Bugkiller
if (str_replace(' ', '', $search) == "") {
if ($search_no_spaces == "") {
echo "Please provide a search query.";
exit;
}
Expand All @@ -61,10 +62,10 @@
} else {
// Output a message if no results were found
echo "<p><b>Couldn't find any bugs that match \"$search\".</b></p><p>You can:</p>";
echo "<ul>"
echo "<ul>";
echo "<li><a href=\"$path/reportbug.php\">Report a bug</a> with that name.</li>";
echo "<li><a href=\"#barsearch\">Searching for something else</a>.</li>";
echo "<li>Using a search engine if you are not looking for search results related to $projectname.</li>";
echo "<li>Using a search engine if you are not looking for search results related to $projectname.<br>This site only indexes $projectname Bugkiller.</li>";
}
}

Expand Down

0 comments on commit f23340d

Please sign in to comment.