search function error

3 posts by 2 authors in: Forums > CMS Builder
Last Post: March 19, 2010   (RSS)

We are using a search function that uses:

$search_type = $_GET['search_type'];

However, the page throws the error: Undefined index if no "search_type" is passed.

What would be the proper syntax to check if a variable is passed and if none is passed assign it one or suppress the error.

Thank you,

Chris

Re: [chris] search function error

Worked, thanks...