Answer the question
In order to leave comments, you need to log in
How to fix Notice: Undefined variable?
What's wrong?
php 7.1
if(stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0')) $xBrowser = 'ie6';
elseif(stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 7.0')) $xBrowser = 'ie7';
elseif(stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 8.0')) $xBrowser = 'ie8';
if($xBrowser == 'ie6' OR $xBrowser == 'ie7' OR $xBrowser == 'ie8')
header("Location: /browser.php");
Answer the question
In order to leave comments, you need to log in
Do you need to do the search logic or display ready-made results that you get from the api?
If the second and api are on the same domain, adjax will do. Offhand, without really delving into it, I would do something like this.
On the form, a change handler that sends user input to the search function via ajax.
We get a jason file with the results, put the headings in the tips immediately, and the results are entered and clicked on the search button.
To make direct hints, and not to load the titles of the found articles, you need to implement some kind of storage of search queries on the backend, otherwise where can you get these hints from.
if(stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0')) $xBrowser = 'ie6';
elseif(stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 7.0')) $xBrowser = 'ie7';
elseif(stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE 8.0')) $xBrowser = 'ie8';
else $xBrowser = 'kawabanga!'; // < ----
if($xBrowser == 'ie6' OR $xBrowser == 'ie7' OR $xBrowser == 'ie8')
header("Location: /browser.php");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question