I have created php and Mysql site.Its Working Locally Xampp well. Finally I moved My site to server..i have Used Mysql Workbench. connected client database in Mysql Workbench in My system.when I Run the code its showing Error:
Validating Information....error with query: SELECT ID,fname,lname,email,userlevel,user_group,orgID FROM students WHERE username='test' AND password='123456' No connection could be made because the target machine actively refused it.
<?php
class db
{
var $persistent=0;
var $query;
var $user="abaceu";
var $pass ="******";
var $host="*********";
var $mydb="mysql_24172_abacu";
var $rlink;
function connect()
{
if($this->persistent==1)
{
$this->rlink = mysql_connect($this->host,$this->user,$this->pass);
}
else
{
$this->rlink = mysql_connect($this->host,$this->user,$this->pass);
}
mysql_select_db ($this->mydb);
}
function query($SQL)
{
$this->query=mysql_query($SQL)or die( "error with query: $SQL ".mysql_error() );
}
function getRows()
{
$this->moreRows=mysql_fetch_array($this->query);
if($this->moreRows<1)
{
@mysql_close($this->rlink);
}
return $this->moreRows;
}
function row($column)
{
return $this->moreRows[$column];
}
function close()
{
@mysql_close($this->rlink);
}
}
/*
$db = new db;
$db->connect();
$db->query("SELECT * FROM x_groups");
//$db->query("INSERT INTO x_groups (group_ID,name) VALUES ('mm10','mystery tester 10')");
while($db->getRows())
//while(odbc_fetch_into($rlink, $row));
{
echo $db->row("name")."---".$db->row("group_ID")."<BR>";
}
*/
?>
any Idea about issues? its worked xampp Local side.But Not Working Host server side ?