-
Notifications
You must be signed in to change notification settings - Fork 0
/
mod_autor.php
47 lines (46 loc) · 1.56 KB
/
mod_autor.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
<!DOCTYPE html>
<html lang="es-CL">
<head>
<?php
require_once("head.php");
?>
</head>
<body>
<div class="navbar navbar navbar-inverse navbar-fixed-top">
<?php
require_once("nav.php");
?>
</div>
<div class="container">
<h2>Modificando un Autor</h2>
<p class="text-info">Aquí modificaremos el nombre del autor.</p>
<form class="form-horizontal" action="editar_autor.php" method="post">
<?php
require_once("connect_autores.php");
$id = $_GET["id"];
$condicion = array("_id" => new MongoId($id));
if ($c_autores->count($condicion) == 1) {
$nameAutor = $c_autores->findOne($condicion);
}
?>
<div class="control-group">
<label class="control-label" for="inputNameAutor">Nombre del Autor</label>
<div class="controls">
<input type="text" name="inputNameAutor" id="inputNameAutor" class="input-xlarge" placeholder="Nombre del Autor" value="<?php echo $nameAutor['nombre']; ?>"/>
<input type="hidden" name="id" value="<?php echo $id; ?>" />
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-large btn-primary"><i class="icon-user icon-white"></i> Modificar Autor</button>
</div>
</div>
</form>
<footer>
<p>Desarrollado por @JuanGarciaR</p>
</footer>
</div> <!-- /container -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
</html>