I recently switched my hosting of my php/mysql website. I successfully recreated and connected the database on the new hosting, all the data for members is displaying, and I'm able to login to my Super Admin. It appears everything is working fine except the login for members keeps coming up as wrong username or password even though I am sure it's been correct. I really have no idea where to pinpoint the problem so thought I would show the code for the login page here and maybe someone can direct me to where I should look. Any help would be great!
Thanks
Camster
<?php
session_start();
if($_SESSION['AUTH']=="OK")
{
header("Location:addIntro.php");
exit;
}
$submit=$_POST['Signin'];
$uid=$_POST['userid'];
$password=$_POST['password'];
$mesg="";
//echo "<pre>";
//print_r($_POST);
if($submit)
{
include "../connections/db.php";
$sql="select GID from golfer where UserId='$uid' and UserPwd='$password'";
echo $sql;
$conn=mysql_query($sql);
$rowscnt=mysql_num_rows($conn);
if($rowscnt!=0)
{
$resc=mysql_fetch_object($conn);
$_SESSION['GID']=$resc->GID;
$_SESSION['USER']=$uid;
$_SESSION['AUTH']="OK";
header("Location:addIntro.php");
//echo "done";
exit;
}
else
{
//echo "whats wrong";
$mesg= "The User ID or Password is incorrect. Please retype the User ID and Password";
}
}
?>