As of PHP4, mail() takes up to 5 parameters, the fourth being additional headers, most commonly used as something like this:
$headers .= "X-Priority: 1\n"; // Urgent message!
...and from the manual about the 5th:
"With the fifth parameter you can set additional command line parameters to the actual mailer. In the example below we set the correct Return-Path header for sendmail. Normally sendmail will add the X-Authentication-Warning header when using the -f parameter, because the webserver user is probably not a member of the trusted users. To suppress this warning, you should add the web server user to the trusted users in your sendmail config file.
Note: This fifth parameter was added in PHP 4.0.5."
What I think you may want to do is concat your $name and $surname and use the result as your 3rd param.
--ph