-
Notifications
You must be signed in to change notification settings - Fork 0
/
livrenet.php
40 lines (39 loc) · 922 Bytes
/
livrenet.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
<?php
/*$conn = mysqli_connect("localhost", "root", "", "livrenet");
if(!$conn){
die("Error al insertar. ERROR ".mysqli_error($conn));
}
$result = $conn->query("SELECT * FROM libros");
while($row = mysqli_fetch_array($result)){
echo $row["ISBN"]."<br>";
}
$categoria = "literario";
$result = $conn->query("INSERT INTO categorias VALUES (NULL, '$categoria')");
if(!$result)
die("Error al insertar. ERROR ".mysqli_error($conn));
*/
?>
<!DOCTYPE html>
<html>
<head>
<title>Livrenet</title>
<meta charset="utf-8">
</head>
<body>
<?php
if(isset($_GET['nombre'])){
?>
<h1>¡<?php echo $_GET['nombre'] ?> ingresado!</h1>
<?php
}else{
?>
<form method="GET" action="livrenet.php">
<label>Ingrese nombre de categoría</label>
<input type="text" name="nombre" value="" placeholder="Aquí nombre de categoría">
<input type="submit" value="Ingresar">
</form>
<?php
}
?>
</body>
</html>