I have two databases and I want to select a database on userid password condition, but right now it is not working with this condition. How can I achieve it? For now, only the first database gets selected, not the second one.
<?php
if($_SESSION['s_activId'] == 'om' && isset($_SESSION['s_userType']) == 'om')
{
$dbName = "kal";
$link = mysql_connect("localhost","root","");
mysql_select_db($dbName) or die("colud not connect to database". mysql_error());
}
else if($_SESSION['s_activId'] == 'om' && isset($_SESSION['s_userType']) == 'om1')
{
$dbName = "kal1";
$link = mysql_connect("localhost","root","");
mysql_select_db($dbName) or die("colud not connect to database". mysql_error());
}
?>