-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindexar.php
52 lines (42 loc) · 1016 Bytes
/
indexar.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
51
52
<?php
require_once 'init.php';
//verificar entradas
if(!empty($_POST)){
if(isset($_POST['title'], $_POST['type'])){
$title = $_POST['title'];
$type = $_POST['type'];
$indexed = $es->index([
'index' => 'buscador',
'type' => 'entradas',
'body' =>[
'title' => $title,
'type' => $type
]
]);
/*if($indexed){
print_r($indexed);
} */
}
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title> Indexador </title>
</head>
<body bgcolor=#F0F0F0 text=#000000> <!Designer do Indexador>
<h1 align="center"><font color="#00000" face="Slalom,Murphy Script,Arial">Indexador</font></h1>
<form action="buscador.php" method="get">
<center><br></br>
<form action="indexar.php" method="post">
<label>
Titulo:
<input type="text" name="title"><br></br>
Tipo:
<input type="text" name="type"><br></br>
</label>
<input type="submit" value="Indexar">
</form>
</body>
</html>