The MySQL database I'm on is hosted by Go Daddy.
I've already built the tables and have all the data in.
It's just that the script I have isn't finding the db.
Below is the login script I'm using.
<?php
$pageTitle = "GRIC";
include("includes.php");
$username = $POST_VARS["username"];
$password = $POST_VARS["password"];
if(!empty($username) && !empty($password))
{
$query = "select * from user where username='$username' and password='$password' and active_yn='Y'";
$res = getDBRecords($query);
if(!empty($res) && count($res)>0)
{
$userAcsLevel = $res[0]["designation_id"];
$fullName = $res[0]["full_name"];
session_start();
$sid = session_id();
setcookie("c_sid",$sid);
setcookie("c_username",$username);
setcookie("c_userId",$res[0]["user_id"]);
setcookie("c_userAcsLevel",$userAcsLevel);
setcookie("c_fullName",$fullName);
$sid = @$COOKIE_VARS["c_sid"];
$nextUrl = @$COOKIE_VARS["beforeLogin"];
if(isset($nextUrl) && !empty($nextUrl))
header("Location:$nextUrl");
else
header("Location:index.php");
}
else
header("Location:login.php?errCode=LGN001");
}
else
header("Location:login.php?errCode=LGN002");
?>