Well, thanks in advance for any advice i could get through this forum, and have a happy day you all
<?
ini_set('display_errors', 1);
$access=1;
$host="localhost"; // Host name
$username="a"; // Mysql username
$password="123456"; // Mysql password
$db_name=$_SESSION['db']; // Database name
$tblusers="users_master"; // Table name
mysql_connect("$host", "$username", "$password") or die("Cannot connect");
mysql_select_db("$db_name") or die("cannot select DB");
$sqluser="SELECT * FROM $tblusers WHERE login='".$_SESSION['login']."'";
$ruser=mysql_query($sqluser);
$numrows=mysql_num_rows($ruser);
if ($numrows==0)
{
echo "Error, usuario no encontrado, comuniquese con el administrador del sistema";
access=0;
} else {
while($info = mysql_fetch_array($ruser))
{
$_SESSION['USER']=$info['userid'];
}
}
?>