<?php


//include("database.php");
//include("db_connect.php");
session_start();

$con = mysql_connect("localhost","custsoft","wapulannunuka");
if (!$con)
  {
  die('Could not connect to database: ' . mysql_error());
  }
   
mysql_select_db("custsoft", $con);

function execsql($qry){
	$result = mysql_query($qry);
	return $result;
}

$check_query = "SELECT  username  FROM  ps_active_users WHERE  username = '".$_SESSION['username']."' ";
$check_result = mySQL_query($check_query);
$check_num = mysql_num_rows($check_result);

if($check_num==1) {
$_SESSION['db_prefix']="ps";	
}
else {
	header('Location: ../login.php?e=1');
}




?>
