From: Anthony Talarico Date: Fri, 29 Jan 2016 17:38:09 +0000 (-0500) Subject: testing search function with cookie X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=ed08147cc2003c613c80bc671e7991ac04390e27;p=WP-Plugins%2Fmichsci-products.git testing search function with cookie --- diff --git a/index.php b/index.php index e2a37bc..7e2c6ab 100644 --- a/index.php +++ b/index.php @@ -464,6 +464,13 @@ function michsci_shortcode($atts) michsci_list_categories($cat_id); } else if ( !$catid_id && !$product_id ) { $text_query = $_REQUEST['tsearch']; + if(isset($_REQUEST['tsearch'])){ + echo $text_query; + setcookie("test", "cool",time()+1, "/" ); + } else { + setcookie("test", "null",time()+1, "/" ); + } + michsci_list_products($text_query); michsci_list_categories(); }