I'll try to explain this...
In the file "guestbookmail.php", there must be the code we've already mentionned. (You could add html below the php.)
If you don't add any html below the php, the file is empty as far as the user knows. The php code gets executed, and in this case it doesn't output anything, it just sends a mail. If you add html below the php code, the php gets executed, sends a mail while not outputting anything, and then the html gets transferred to the client. (Anything between <?php and ?> disappears in this file.)
I don't think you get the point of what happens to your form data either, so I'll explain that too.
When you click the submit button, the client requests the page "guestbookmail.php" and adds POST information. (The stuff you entered in the form.) The file "guestbookmail.php" is to be send out by the server now, but the server won't send it, as it knows it has to be executed first.
The server executes the file and sends the result to the cient. When the server executes the file, everything between <?php and ?> dissappears and gets replaced by the output of that code. In this case the code doesn't output anything.
Examples:
This code:
PHP:
<?php
$var = "Text";
?>
There's no text.
outputs "There's no text.", since everything between <?php and ?> dissappears and gets replaced by the output, which is empty.
PHP:
<?php
echo "Text";
?>
There's text.
outputs "TextThere's text.", since this time, the output is "Text".
I hope this made it any more clear...
Marshian