You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

38 lines
924 B

<?php
/**
* Open a connection via PDO to create a
* new database and table with structure.
*
*/
require "config.php";
try {
$connection = new PDO("mysql:host=$host", $username, $password, $options);
$sql = file_get_contents("data/automoviles.sql");
$connection->exec($sql);
require "./public/templates/header.php"; ?>
<section id="four" class="main style2 special">
<div class="container">
<header class="major">
<h2>Base de datos creada</h2>
</header>
<section>
<p>La base de datos ha sido creada con éxito</p>
<ul class="actions special">
<li><a href="./public/vehiculos/create.php"><strong>Crear vehículos</strong></a></li>
</ul>
</section>
</div>
</section>
<?php require "./public/templates/footer.php";
} catch(PDOException $error) {
echo $sql . "<br>" . $error->getMessage();
}