<?php

include 'contacts_repo.php';
include 'locations_repo.php';
ContactsRepository::getInstance()->reset();
LocationsRepository::getInstance()->reset();
header("Location: ./index.php");
 public static function getInstance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
<?php

include 'contacts_repo.php';
$contacts_repo = ContactsRepository::getInstance();
$contacts_repo->addContacts($_POST["contacts"]);
?>

<html>
<body>Contactos recibidos: <?php 
echo $_POST["contacts"];
?>
</body>
</html>