Every so often someone asks on forums and on IRC if it's possible to nest <form>elements.

Well, it's not! If you need to send form data to different script or use different functionality on it, simply name the submit buttons differently and check in your backend code which one was clicked.

Test it:

Enter something:

HTML

<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
	Enter something: <input type="text" name="entry" />
	<input type="submit" name="mail" value="Send as mail" />
	<input type="submit" name="file" value="Send to file" />
</form>

PHP

<?php
	$entry=stripslashes(htmlentities($_POST['entry']));
	if ($entry){
	if ($_POST['mail']!=""){
		echo "This '$entry' would be mailed.";
	}
	else if ($_POST['file']!=""){
		echo "This '$entry' would be sent to a file.";
	}
	}
?>