I'm trying to make a php search engine on my web side, but the search field will be place at the header on every page on my website and not just in one single serach.php page.

So at my index.html i will start with code with:

//my code

Now my question is, will the php script work if i still save the file as index.html? or do i need to change it to index.php to allow the php script to work. If so, does it mean that i have to save my entire website as php, since the search field will paced at the header trought all the pages. If thats the case, is it any way to embed or run a php script and still call the file .html?