-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
47 lines (32 loc) · 1.19 KB
/
index.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
<html>
<body bgcolor="green">
<form method="POST" action="addwall.php">
<center><strong>Ingresar mensaje:</strong> <input type="text" name="T1" size="60"> <input type="checkbox" name="html" value="html"> <strong>Html</strong><br><br>
<input type="submit" value="Agregar" name="valor"></center>
</form>
<iframe id="request" hidden>
<iframe src="wall.php" height="40%" width="95%" align="middle"></iframe>
</iframe>
<div id="response"></div>
</body>
</html>
<?php
require_once 'login.php';
$obj_conexion = mysqli_connect($db_hostname, $db_username, $db_password, $db_database);
if(!$obj_conexion)
{
// echo "<h3>No se ha podido conectar PHP - MySQL, verifique sus datos.</h3><hr><br>";
}
else
{
// echo "<h3>Conexion Exitosa PHP - MySQL</h3><hr><br>";
}
$query = "SELECT * FROM mensaje ORDER BY id DESC";
$resultado = mysqli_query($obj_conexion,$query);
if (!$resultado) die("El acceso a la base de datos ha fallado: " . mysqli_error());
while($row = mysqli_fetch_assoc($resultado)) {
$valor = $row['valor'];
$fecha = $row['fecha'];
echo "<center><font color=pink>". $valor ." ". $fecha."<br></font></center>";
}
?>