瀏覽代碼

añadiendo estilo al php

Okynos 9 年之前
父節點
當前提交
9e6015f2ca
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      index.php

+ 4 - 1
index.php

@@ -17,6 +17,8 @@
 <div>
   <h2>Elementos en la Base de datos</h2>
   <div class="elements" style="border:1px solid black;">
+    <ul>
+
     <?php
       $c = new MongoClient( "mongodb://docker.ugr.es:15074" );
       $db = $c->test->elements;
@@ -29,9 +31,10 @@
 
       $cursor = $db->find();
       foreach ($cursor as $documento) {
-        echo "<p>* Nombre: " . $documento["name"] . "\t <---> \t E-mail: " . $documento["email"] . " ---> <a href='index.php?remove=".$documento["name"]."'>Eliminar usuario</a>\n</p>";
+        echo "<li> Nombre: " . $documento["name"] . " -- E-mail: " . $documento["email"] . " ---> <a href='index.php?remove=".$documento["name"]."'>Eliminar usuario</a></li>";
       }
     ?>
+    </ul>
   </div>
 </div>