enter code hereMy php file is not posting the form on my database. I have searched in other threads, but i can't make it work. I tried everything, but I can't make it work. I am using XAMPP for hosting. Code:
<?php
$link=mysql_connect('localhost','root','');
mysql_select_DB('registro',$link);
?>
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="icon" type="image/png" href="/images/icon.png" />
    <title>Insert.</title>
    <link href="estilo.css" rel="stylesheet" type="text/css" />
  </head>
  <link href="../../../../../Mis Cosas/Mis documentos/Insert/estilos/estilos.css"     rel="stylesheet" type="text/css">
  <body>
      <?php if(!$_POST) { ?>
      <h1>Registro</h1> 
      <form id="form1" name="form1" action="index.php" method="POST">
        <p>Nombre:
          <input name="nombre" type="name" class="input" placeholder="Nombre">
        </p>
        <p><BR>Apellido:
          <input name="ape" type="text" class="input" placeholder="Apellido">
        </p>
        <p>Email:    
          <input name="email" type="email" class="input" placeholder="Email">
        </p>
        <p>Teléfono: 
          <input name="tel" type="text" class="input" placeholder="Teléfono">
        <BR>
          <input name="enviar" type="submit" class="button" value="Enviar">
        </p>
      </form>
      <?php 
      }else{
      $nombre=$_POST['nombre'];
      $apellido=$_POST['ape'];
      $email=$_POST['email'];
      $tel=$_POST['tel'];
      $sql = "INSERT INTO clientes(nombre,apellido,email,tel) VALUES('$nombre','$apellido','$email','$tel')";
      Mysql_query($sql);
      print"Done";
      }?>
  </body>
</html>
 
    