Hello, I need to know how to connect with 2 different users to 2 different databases on 1 page..
Is this possible.. I am getting major errors.. I can get the 1 statement to work..
the 2 one gives me errors...
If i put the 2 one on the page by it self it works.
i dont know here they are
they need to work on the same page
$name1 = $name;
$pass1 = $pass;
$mysql = mysql_connect( 'ipaddress', 'user', 'pass' );
$db = mysql_select_db("Domain");
$query23 = "select * from Login where Uname ='$name1' and Upass = password('$pass1')";
$result23 = mysql_query($query23, $mysql);
if ($result23)
{
$row23 = mysql_fetch_array($result23);
$rs= $row23["DomainName"];
$rs_array = explode(".", $rs);
$rs_array[1] = "inc";
$includeit = join(".", $rs_array);
session_register("name1");
session_register("pass1");
include("Stats/$includeit");
setcookie("name");
setcookie("pass");
mysql_close($mysql);
}
$mysql = mysql_connect( "ipaddress, 'user', 'pass' );
$db = mysql_select_db("Shopitnexflo",$mysql);
$query2 ="select * from steps";
$result2 = mysql_query($query2, $mysql);
if ($result2)
{
$crow = mysql_fetch_array($result2);
$cvar = $crow["step1"];
}
you can test it and see my errors
www.nexflo.com/newsite/phpscripts/login.php
If you click on site management you will see where I am getting my errors..
Thank you very much all for your help🙂
Chris Calzaretta