Thanks
Camster
Code: Select all
<?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";
}
}
?>Thanks