Created
January 29, 2018 15:51
-
-
Save oneberto/68a777f85e787e5e30823d6521a0b64e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$servidor = 'localhost'; | |
$usuario = 'root'; | |
$senha = ''; | |
$banco = 'mydb'; | |
// Conecta-se ao banco, usando os valores das variaveis acima | |
$mysqli = new mysqli($servidor, $usuario, $senha, $banco); | |
// Mostra algum error (se existir) | |
if (mysqli_connect_errno()) trigger_error(mysqli_connect_error()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment