Ok, obviously it was something I said....
but:
Code:
if ($in->param('query') = $in->param('query') . ' ' . $in->param('query2')) {
&search ($in, $dynamic);
}
else {
&site_html_search_form ( { query => '' }, $dynamic );
}
is not a valid statement....
When I said "insert something like" I meant it literally!!
Code:
if ($in->param('query')) {
if ($in->param('query2') {
$in->param('query') = $in->param('query') . ' ' . $in->param('query2');
}
&search ($in, $dynamic);
}
else {
&site_html_search_form ( { query => '' }, $dynamic );
}
What you want to do is test to see if there is a 'query' if there is a query,
then you want to test to see if there is query2 -- if not, ignore it, if there is, append it to the end of the query string and go do something with the new query. Else, there is no query, so print out the search
form again.
(This is assuming a default "AND" connectory in the search query string from the form.)
When I had originally put the line:
$in->param('query') = $in->param('query') . ' ' . $in->param('query2');
It was because I was thinking the second "if" test is really not needed, since
if query2 is null, it's not going to do anything anyway, but obviously it made
readability really bad!
Sorry,
[This message has been edited by pugdog (edited February 28, 2000).]