Quiero mover datos de una tabla a otra
Publicado por Felix J (2 intervenciones) el 21/08/2019 16:01:56
Hola Tengo este condigo el cual me muestra una tabla todo funciona bien pero haora quiero mover estos datos
de una tabla a otra puede ser por checkbox o por form enviado a traves de un input pero no tengo la logica
de una tabla a otra puede ser por checkbox o por form enviado a traves de un input pero no tengo la logica
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
include 'session_segura.php';
require 'database.php';
$sql = "INSERT INTO eventos_ok ( mover) VALUES (:mover)";
$obtiene_De_bd = " SELECT * FROM reportes ";
$resultado_anterior=$conn->query($obtiene_De_bd);
?>
<!DOCTYPE html>
<html lang="esp">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Welcome</title>
<link href="css/tabla_eventos_pendientes.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php include 'navegacion.php'; ?>
<main class="main">
<div class="container">
<table>
<tr>
<th>#</th>
<th>Habitacion</th>
<th>Departamento</th>
<th>Comentario</th>
<th>Reportado a </th>
<th>Fecha y hora </th>
<th>Usuario</th>
</tr>
<?php
while($registroempleados = $resultado_anterior->fetch(PDO::FETCH_ASSOC))
{
echo'<tr>
<td>'.$registroempleados['id_reporte'].'</td>
<td>'.$registroempleados['habitacion'].'</td>
<td>'.$registroempleados['departamento'].'</td>
<td>'.$registroempleados['comentario'].'</td>
<td>'.$registroempleados['empleado'].'</td>
<td>'.$registroempleados['fecha'].'</td>
<td>'.$registroempleados['usuario'].'</td>
<td>
<form action="tabla_eventos_pendientes.php" method="post">
<input type="hidden" name="mover" value="<?php echo $registroempleados ?>">
<input type="submit" value="Cambiar OK">
</form>
</td>
</tr>';
}
?>
</table>
</div>
</main>
<?php include 'footer.php'; ?>
</body>
</html>
Valora esta pregunta


0