asi tambien puede ser creo, es lo que puso aljacer pero mas simple
en la tabla de la base de datos, el identificador (ID) teni que dejarlo como auto increment
(index.php)
<html>
<body>
<form method="post" action="agrega_registro.php">
nombre:<input type="text" name="nombre">
<input type="submit">
</form>
</body>
</html>
(agrega_registro.php)
<?php
include("conexion.php");
$nombre = $_POST['nombre'];
mysql_query("INSERT into registro (nombre) values ('$nombre')");
?>
(conexion.php)
<?php
$con = mysql_connect('localhost', 'root', 'root')
or die("ERROR: No se pudo conectar a la base de datos.<br>". MYSQL_ERROR());
mysql_select_db('prueba', $con);
?>
no usis dreamweaver