Search (outside) for "php mysql tutorial".
The php code should read the "get" (or "post") parameters, issue the queries accordingly and print the response.
This code returns an array with the "get" parameters:
$_GET and $_POST are special arrays that holds the get and post parameters.