Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class conexao {
- private $conexao;
- private $host="localhost";
- private $usuario="root";
- private $senha="";
- private $banco="agenda";
- function _construct(){
- $con = mysql_connect($this->host,$this->usuario,$this->senha);
- if($con==false){
- die ("Erro ao conectar");
- }
- else {
- $this->conexao= $conexao;
- $selectBD = mysql_select_db($this->banco,$this->conexao);
- if($selectBD==false) {
- die ("Erro de seleção de Base de Dados.");
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement