Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created October 5, 2020 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/921c94f72b59539e1a5ca4aeef5b7adc to your computer and use it in GitHub Desktop.
Save parzibyte/921c94f72b59539e1a5ca4aeef5b7adc to your computer and use it in GitHub Desktop.
<?php
$host = "localhost";
$usuario = "root";
$contrasenia = "";
$base_de_datos = "escuela";
$mysqli = new mysqli($host, $usuario, $contrasenia, $base_de_datos);
if ($mysqli->connect_errno) {
echo "Falló la conexión a MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment