aca el code de la funcion para conectar.
Código PHP:
function conectar($conectar) // Conectar = 1
{
$link='';
if($conectar == 1)
{
$link = mysql_connect('localhost','root','root')
or die('No se pudo conectar a la base de datos (Config.php). '.mysql_error());
mysql_select_db('cosit')
or die(
include("error.php")
);
//"No se puede seleccionar la BD. " .mysql_error());
}
if($conectar == 0)
{
$link = mysql_connect('localhost','root','root');
mysql_close($link);
}
}
alguna sugerencia???
gracias.