Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$contraseña = "";
$usuario = "root";
$nombre_base_de_datos = "pruebas";
try{
$base_de_datos = new PDO('mysql:host=localhost;dbname=' . $nombre_base_de_datos, $usuario, $contraseña);
}catch(Exception $e){
echo "Ocurrió algo con la base de datos: " . $e->getMessage();
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment