IMPOSIBLE CONECTAR A LA BBDD SI EL USUARIO ELEGIDO TIENE CONTRASEÑA Y NINGUN PROBLEMA SI S

SITUACION_DESESPERADA
26 de Enero del 2006
SI SE USAN USUARIOS CREADOR EN MYSQL ADMINISTRATOR SIN PASSWORD TODO VA BIEN PERO SI SE USAN OTROS CON PASSWORD O SE LE PONE PASSWORD A UNO QUE NO LA TENIA DA ERROR IMPOSIBLE REALIZAR CONEXION , ESTO OCURRE INCLUSO CON EL USUARIO ROOT SI SE LE ACTIVA CONTRASEÑA


<?
// variables conexion con el servidor Mysql
$dbusuario=trim($dbusuario);
$dbusuario=addslashes($dbusuario);

$dbclave=trim($dbclave);
$dbclave=addslashes($dbclave);

$dbusuario=$HTTP_POST_VARS[\\\\\\\\\\\\\\\\'dbusuario\\\\\\\\\\\\\\\\'];
$dbclave=$HTTP_POST_VARS[\\\\\\\\\\\\\\\\'dbclave\\\\\\\\\\\\\\\\'];

$dbhost=\\\\\\\\\\\\\\\"localhost\\\\\\\\\\\\\\\";
$db=\\\\\\\\\\\\\\\"jefatura-horaria\\\\\\\\\\\\\\\";

$conexion=mysql_connect($dbhost, $dbusuario, $dbclave);
if(!$conexion) {
echo(\\\\\\\\\\\\\\\"<p> ERROR. No se pudo establecer la conexion con la bases de datos <p>\\\\\\\\\\\\\\\");
exit();
}

$resultado=mysql_select_db($db, $conexion);
if(!$resultado) {
echo(\\\\\\\\\\\\\\\"<p> ERROR. No se pudo abrir la bases de datos <p>\\\\\\\\\\\\\\\");
exit();
}
setlocale(\\\\\\\\\\\\\\\"LC_ALL\\\\\\\\\\\\\\\", \\\\\\\\\\\\\\\"sp\\\\\\\\\\\\\\\");
echo \\\\\\\\\\\\\\\" [email protected] <B> $dbusuario </B> \\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\";
echo \\\\\\\\\\\\\\\" a la Sesión del \\\\\\\\\\\\\\\", strftime(\\\\\\\\\\\\\\\"%A\\\\\\\\\\\\\\\"),\\\\\\\\\\\\\\\", \\\\\\\\\\\\\\\", strftime(\\\\\\\\\\\\\\\"%d\\\\\\\\\\\\\\\"), \\\\\\\\\\\\\\\" de \\\\\\\\\\\\\\\",strftime(\\\\\\\\\\\\\\\"%B\\\\\\\\\\\\\\\"), \\\\\\\\\\\\\\\" de \\\\\\\\\\\\\\\",strftime(\\\\\\\\\\\\\\\"%Y\\\\\\\\\\\\\\\"),\\\\\\\\\\\\\\\" a las \\\\\\\\\\\\\\\", strftime(\\\\\\\\\\\\\\\"%I:%M:%S \\\\\\\\\\\\\\\"),\\\\\\\\\\\\\\\"<BR>\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\";
//gestion de sesiones
session_start();
$HTTP_SESSION_VARS[\\\\\\\\\\\\\\\"usuario\\\\\\\\\\\\\\\"]=$dbusuario;
$HTTP_SESSION_VARS[\\\\\\\\\\\\\\\"password\\\\\\\\\\\\\\\"] = $dbclave;

?>