I'm trying to redirect a blank search page to the search page, or at least have a functionality like that.
Right now, I can get it to either run a blank search and retrieve everything in the mysql db, or I can get it to run an error and then exit the script.
I tried
if ($trimmed == "") {
header ("Location: [url]www.google.com[/url]")
}
But this keeps giving me the following error.
Warning: Cannot modify header information - headers already sent by (output started at /web/searchpage.php:4) in /web/searchpage.php on line 42