Can anybody see a problem with this? Am I being stupid?
if (!isset($_REQUE ST["input"]) || "" == $_REQUEST["input"])
{
throw new Exception("need query");
}
else
{
echo "<p>Search words: $_REQUEST[input]";
}
/*
* split input into array of query words
*/
$queries = array_map(mysql _real_escape_st ring, explode(" ",
$_REQUEST["input"]));
This works on one server, running PHP5, but not another. Both apache.
I've checked php.ini but cannot see why this seemingly simple bit of
code should fail in one instance.
In the one where it fails to work $queries is set to "" where I would
expect it to be set to an array of the values of $_REQUEST["input"],
split at each space.
No errors are reported even with error_reporting (E_ALL);
$_REQUEST is definitely set as the echo line prints out the input as
expected.
if (!isset($_REQUE ST["input"]) || "" == $_REQUEST["input"])
{
throw new Exception("need query");
}
else
{
echo "<p>Search words: $_REQUEST[input]";
}
/*
* split input into array of query words
*/
$queries = array_map(mysql _real_escape_st ring, explode(" ",
$_REQUEST["input"]));
This works on one server, running PHP5, but not another. Both apache.
I've checked php.ini but cannot see why this seemingly simple bit of
code should fail in one instance.
In the one where it fails to work $queries is set to "" where I would
expect it to be set to an array of the values of $_REQUEST["input"],
split at each space.
No errors are reported even with error_reporting (E_ALL);
$_REQUEST is definitely set as the echo line prints out the input as
expected.
Comment