Here is a brief example, you should get the idea
First your form (form.html)
<form action="script.php" method="POST">
<input type="text" name="email" maxlength="24">
<input type="submit" value="Submit!">
</form>
Then your php (script.php)
<?
//connect to DB
mysql_query("INSERT INTO table (email) VALUES ('$email')") or die(mysql_error());
$email = mysql_query("SELECT email FROM table WHERE email='$email'") or die(mysql_error());
echo $email;
?>