Incam_Intranet/Objects/Conexion.php

32 lines
487 B
PHP

<?php
class Conexion{
private $link;
private $bd = "localhost";
private $user = "root";
private $password = "password";
private $nombre_bd = "selfor";
function Conexion(){
$this->link=mysql_connect($this->bd,$this->user,$this->password);
if (!mysql_select_db($this->nombre_bd,$this->link))
{
return false;
}
mysql_query("SET NAMES 'latin1'");
return $this->link;
}
function getLink(){
return $this->link;
}
}
?>