Question by ThO: Why do i maintain getting a “Notice: Undefined index: subject” error?
Im beginning to create a search engine but whenever i open the page i get a “Notice: Undefined index: submit” and Notice: Undefined index: search” error on line 5 and 6.the code for the index page is

My Search Engine.

and the search page is< ?php//get data$ button = $ _GET['submit']; <-----line 5$ search = $ _GET['search']; <-----line 6if (!$ button)echo "You didn't submit a keyword";else {echo$ search;}?>

Best answer:

Answer by Gitlez
There doesn’t seem to be anything wrong with your code. Other then the fact that you’re using &

:) You might want to check your server settings in your ini files.Try this first, if it working then there’s something I’m missing or a setting.—————————– search.php ———————————–< ?php$ button = $ _GET['submit'];$ search = $ _GET['q'];if($ button){ echo "You didn't submit a keyword";}else{ echo $ search;}--------------------------------- index.html -------------------------
My Search Engine.

——————————————————————Let me know how it goes, if you need anything else gitlezXX@gmx.com (remove the XX, anti-spam measure).

What do you think? Answer below!