tienes razon ahi te va el codigo.Gracias
--formulario--
<html>
<head>
<title>Inserccion de Clientes</title>
</head>
<body>
<center>
<h2>Introduzca sus datos</h2>
<form method="POST" action="Clientes.php">
<table cellpadding="3" cellspacing="10">
<tr>
<th>DNI:</th><td><input type="text" name="dni"></td>
</tr>
<tr>
<th>Nombre:</th><td><input type="text" name="nombre"></td>
<th>Apellidos:</th><td><input type="text" name="apellidos"></td>
</tr>
<tr>
<th>Dirección(c/,num,piso):</th><td colspan="3"><input type="text" name="direccion" size="62"></td>
</tr>
<tr>
<th>CP:</th><td><input type="text" name="cp"></td>
<th>Poblacion:</th><td><input type="text" name="poblacion"></td>
</tr>
<tr>
<th>E-Mail:</th><td><input type="text" name="email"></td>
<th>Telefono:</th><td><input type="text" name="telefono"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="enviar" value="Enviar Datos"></td>
<td></td>
<td><input type="reset" name="borrar" value="Borrar Datos"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
--Conexion bd--
<html>
<head>
<title>Clientes</title>
</head>
<body>
<center>
<?php
$metodo=$_SERVER['REQUEST_METHOD'];
$cad_consulta=$_SERVER['QUERY_STRING'];
echo "<b>Query String</b>:$cad_consulta<hr>";
$dni=$_POST['dni'];
$nombre=$_POST['nombre'];
$apellidos=$_POST['apellidos'];
$direccion=$_POST['direccion'];
$cp=$_POST['cp'];
$poblacion=$_POST['poblacion'];
$email=$_POST['email'];
$telefono=$_POST['telefono'];
include('../conexion.php');
$sql="insert into cliente values('','$dni','$nombre','$apellidos','$direccion',$cp,'$poblacion','$email',$telefono)";
$consulta="select DNI from cliente where DNI='$dni'";
if($datos=mysql_query($consulta,$conexion))
{
if(mysql_num_rows($datos)>=1)
{
print("El cliente ya existe");
}
else
{
if($datos=mysql_query($sql,$conexion))
{
print("Inserccion de".mysql_affected_rows($conexion)." cliente<br>");
}
else
{
print("Error al realizar la inserccion");
}
}
}
else
{
echo "Consulta no realizada";
}
?>
</center>
</body>
</html>