|
|
@@ -19,9 +19,12 @@
|
|
|
<?php
|
|
|
$c = new MongoClient( "mongodb://docker.ugr.es:15074" );
|
|
|
$db = $c->test->elements;
|
|
|
+ if(isset($_GET['remove']){
|
|
|
+ $db->remove({});
|
|
|
+ }
|
|
|
$cursor = $db->find();
|
|
|
foreach ($cursor as $documento) {
|
|
|
- echo "* " . $documento["name"] . $documento["email"] . "<a href='index.php'>Eliminar usuario</a>\n";
|
|
|
+ echo "* Nombre:" . $documento["name"] . " - E-mail:" . $documento["email"] . " <a href='index.php?remove=".$documento["name"]."'>Eliminar usuario</a>\n";
|
|
|
}
|
|
|
?>
|
|
|
</div>
|