CRUD (codigo)
<?php //Index //conexion $hostDB = '127.0.0.1' ; $nombreDB = 'ejemplo' ; $usuarioDB = 'root' ; $contrasenaDB = '' ; $hostPDO = "mysql:host= $hostDB ;dbname= $nombreDB ;" ; $miPDO = new PDO ( $hostPDO , $usuarioDB , $contrasenaDB ); //fin de conexion $miConsulta = $miPDO -> prepare ( " SELECT * FROM libros; " ); $miConsulta -> execute (); ? > <! DOCTYPE html > < html lang = "en" > < head > < meta charset = "UTF-8" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title > Document </ title > < style > table { border-collapse : collapse ; width : 100% ; } ...