![]() |
Access search substring in search.php
I want to run an external process as part of search.php when a customer types in a search term. Can someone tell me which variable has the substring that is entered in the search form (x-cart 4.1.9).
|
Re: Access search substring in search.php
There is array $posted_data that is cleaned out according to the array
$allowable_search_fields set in search.php: PHP Code:
|
Re: Access search substring in search.php
I added the following to xcartdir/search.php just to see if this was the correct variable.
$searchterm = $posted_data["substring"]; echo "$searchterm"; echo returns blank data which leads me to believe this is the wrong variable? |
Re: Access search substring in search.php
I've placed
PHP Code:
in search.php after the line PHP Code:
and it works |
Re: Access search substring in search.php
Cool. So echo must not work at that point in the script. die ($searchterm) worked for me too.
Thanks. |
Re: Access search substring in search.php
It is not for sure but I suspect the page to redirect after search form submitting so its content is refreshing after echo.
|
All times are GMT -8. The time now is 01:34 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.