You could always make a page called setpage.php and use this to reformulate the url and send you back to form.php so you are not posting to the same page.
I realize this is in the PHP category, but why not use javascript to grab the search term and redirect the user:
var form = document.getElementById("myForm");
form.addEventListener("submit", function(e){
e.preventDefault();
var term = document.getElementById("text").val;
window.location.href = "form.php?term=" + term;
});
ALL inputs will be shown in the url if you use GET , NONE if you use post. The TRUE reason to use use GET is to make the URL bookmarkable.
As such you probably want to show BOTH the data ( term) and the action (search)… unless for some reason your script automatically searches? so then you don’t need the name on the search button and you can stick with GET. the form will submit, just no value will be passed for that button. You can ten check for one of the other required fields on the form as a test for submittal, perhaps?
Thanks all for the suggestions. I learned from your replies. Though, I don’t want to add any additional steps or extra code (hidden input, redirects, javascript etc.) whenever a simpler alternative is possible. Simplicity is what I seek while coding so I removed the name attribute from the submit button as Dormilich and dresden_phoenix suggested and that works just fine for me.