PHP提取网址

I have this ajax based quiz that leads to php based contact_details page after the last question is answered. Now, the answers submitted by the user on the quiz are parsed through the url of the contact_details page. Now, when the user fills up his details and clicks Submit, I need the url (answers) to the quiz too to be submitted so that I receive the email with the contact details and the answers to the ajax quiz.

Could you tell me how to capture the url so that it could be sent on submit?

Please have a look for PHP $_SERVER variables:

$server = $_SERVER["SERVER_NAME"]; // eg. "stackoverflow.com"
$uri = $_SERVER["REQUEST_URI"]; // eg. "/questions/19133954/php-extract-url"

Manual reference: http://php.net/manual/en/reserved.variables.server.php