supponendo che la pagina si chiama pippo.phpprova così
	Codice PHP:
	
<html>
<head>
<body>
<?php
include 'config.php';
include 'connectdb.php';
if ($_REQUEST['id']) {
  $query = "insert into contatti (nome, mail) values ('".$_POST['nome']."' , '".$_POST['mail']."')";
  mysql_query($query) or die ("Errore nella query");
}
?>
<form method="post" id="form" action="pippo.php?id=1">
nome:
<input type=text size=40 name=nome>
mail:
<input type=text size=40 name=mail>
 <input type=submit value=Invia> </form>
</body>
</head>
</html>
<?php
include 'closedb.php';
?>