the button would have to be in a form whose 'action' value would be the common .php page (what you call the 'same page'. On that page (in that code) you run the query wich gets the results you need ? After all, you do get (if you give the buttons all the same name) the value to search for in one and the same variable (lets call it $buttonvalue).