Use of uninitialized value in sprintf at ./test.pl line 115. Use of uninitialized value in sprintf at ./test.pl line 116. Use of uninitialized value in concatenation (.) or string at ./test.pl line 117. Can't call method "fetchrow_hashref" on an undefined value at ./test.pl line 118.

$sth is a hash "reference" (HASH(0x85da454)). As soon as your script ends (i.e. navigating to another page), the data that the $sth reference "linked to" is lost and cannot be accessed.

You can only post / get "strings" and not "perl data structures". Your options are to build the data structure into a string which you can later parse or to use a different method i.e. sessions, which have the ability to hold perl data structures.

However, there should be no reason why you would need to pass $sth via param etc. You should simply execute a fresh query to the database having only passed i.e. $searchvalue via param.