Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $server = '127.0.0.1';
- $username = 'root';
- $password = '';
- $dbname = 'cadastro';
- $conexao = mysql_connect($server, $username, $password);
- $db = mysql_select_db($dbname);
- if(!$conexao):
- exit('conexão falhou: '. mysql_error());
- endif;
- if(!$dbname):
- exit('Falha ao selecionar base de dados: '. mysql_error());
- endif;
- print 'Conexão com MySQL Server: OK <br />';
- print "Definição da base de dados <b>$dbname</b>: OK";
- /*
- * end of file conexao.php
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement