-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch_datos.php
50 lines (40 loc) · 948 Bytes
/
search_datos.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html>
<head>
<title>Datos HW </title>
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/custom.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-12">
<?php
/*
**www.moleculax.com.ve
**https://github.com/moleculax
*/
include("Form_search.php");
require 'vendor/autoload.php';
$cn = (new MongoDB\Client("mongodb://127.0.0.1:27017"))->dbname->BDequipos;
if($cn==true) {
echo "<hr>"; //porque no hubo excepciones
}
$client = new MongoDB\Client();
$nom = $client->BDequipos->conexion;
$curs = array("idpc" => $_POST["idpc"]);
$cursor = $nom->find($curs);
foreach($cursor as $doc) {
echo"IDPC: ". $doc['idpc']." ";
echo"IP: ". $doc['ip']." ";
echo"MAC: ". $doc['mac']."<br>";
echo"<br>";
}
?>
</div>
</div>
</div>
</body>
</html>