-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditar_contacto.php
56 lines (52 loc) · 2.12 KB
/
editar_contacto.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
53
54
55
56
<?php
include 'header.php';
?>
<?php
include "dbconf.php";
?>
<?php
$inicial= $_REQUEST['contacto'];
$conexion = new mysqli($server, $usuario, $contrasena, $base_de_datos);
$consulta = mysqli_query($conexion, "select * from correos where id = '$inicial'" ) or trigger_error('Error al ejecutar la consulta. Detalles = ' . mysqli_error());
$contacto = mysqli_fetch_array($consulta);
?>
<div class="container col-md-4">
<center>
<h1> Edicion del Contacto</h1>
<font size="verdana">
</center>
<form class="form-horizontal" name="agenda" action="edit_contacto.php" method="post" >
<strong>
<div class="form-group">
<label>ID</label>
<input type="text" class="form-control" name="id" id="disabledInput" value="<?php echo $contacto['id']; ?>" autofocus required>
</div>
<div class="form-group">
<label>Nombre</label>
<input type="text" class="form-control" name="nombre" value="<?php echo $contacto['nombre']; ?>" autofocus required>
</div>
<div class="form-group">
<label>Apellido</label>
<input type="text" class="form-control" name="apellido" placeholder="Apellido" value="<?php echo $contacto['apellido']; ?>" autofocus required>
</div>
<div class="form-group">
<label>Telefono</label>
<input type="tel" class="form-control" name="telefono" pattern="\[0-9]{10}$" placeholder="Ej: 6641234567" value="<?php echo $contacto['telefono']; ?>" required>
</div>
<div class="form-group">
<label>Correo</label>
<input type="mail" class="form-control" name="correo" placeholder="[email protected]" value="<?php echo $contacto['correo']; ?>">
</div>
<div class="form-group">
<label>Empresa</label>
<input type="text" class="form-control" name="empresa" placeholder="" value="<?php echo $contacto['empresa']; ?>">
</div>
<div class="form-group">
<label>Giro</label>
<input type="text" class="form-control" name="giro" placeholder="" value="<?php echo $contacto['giro']; ?>">
</div>
</strong>
<button type="submit" class="btn btn-primary">Modificar</button>
<button type="reset" class="btn btn-primary">Limpiar</button>
</form>
</div>