Prova con:
E leggiti la seguente pagina di manuale:Codice PHP:<html>
<head>
<?php
if (isset($_POST['inviato'])) {
echo("Il seguente nome è stato");
echo(" immesso: " . @$_POST['nm'] . " " . @$_POST['cg'] . "
");
}
?>
</head>
<body>
Digitate un nome e inviate il form:
<form action="prova.php" method = "post">
<input name="cg" />
cognome
<input name="nm" />
nome
<input type="submit" name="inviato"/>
<input type="reset" />
</form>
</body>
</html>
http://www.php.net/manual/it/tutorial.forms.php

Rispondi quotando