Hi,
I have a php script pulling data from a mysql database. I now want to be able to search for a string in field and only display the matching lines. This all works well unless the query returns multiple pages.
If I attempt to access the next page of the results, the contents of the variable used for the string matching just doesn't work in the php_self results. I need to be able to do a match on a portion of the field with the LIKE operator within the php_self page. I haven't been able to get it to work:
if ($offset!=1) { // bypass PREV link if offset is 0
$prevoffset=$offset-$limit ;
print "<a href=\"$PHP_SELF?offset=$prevoffset&host=$host&priority=$priority&
date=$date&msg=$message&limit=$limit\">PREV</a> \n";
}
It's the $message variable that needs to match a string within the database field. I've tried escaping spaces in the URL, urlencode and a few other things trying to use the LIKE operator. It only works for the first page which is of course the oringinal query that contains the LIKE operator.
The current result URL looks like this:
https://support.p2pa.net/syslog/results-new.php?offset=26&host=&priority=&date=*&msg=sa_created&limit=25
The msg= is where I need to use LIKE.
Thanks for any help.