<script type="text/javascript>
function submitFrame(f){
f.action="test2.php";
f.method="myiframe";
f.submit();
}
</script>
<form id="form" action="test2.php" method="POST">
<input type="text" name="data" />
<iframe width="500" height="500" name="myiframe"></iframe>
<input type="button" value="" onclick="submitFrame(mail)" />
</form>
<-- test2.php -->
<?
echo $_POST['data'];
?>