That just builds a query string, so the resulting URL would look like:
/myscript.php?p=32&foo=bar
When you click that link, the script would presumably use the data in the query string (e.g. from the $_GET array) to determine which photo to retrieve from the database (or wherever).