Code:
<form name="contactform" action="index.php?$session[sessionurl]do=messageme" method="post">
// Parts of the form.
</form>
if ($_POST['messageme'])
{
// process and send message
}
The first part is your form displayed to the user to input things to.
When submitted, it goes to the 'messageme' part of your php code and executes what is in that part of the code (presumably emailing you the form contents).