I am having some problems with some PHP.
Here are the two files that aren’t clicking when I try to login. (The site is www.manalapangolf.com/golf Login: Guest Password: Guest)
The problem is:
header()
Parse error: parse error, unexpected T_IF, expecting ‘)’ in /home/manalapan/domains/manalapangolf.com/public_html/golf/auth.inc.php on line 51
First Document: (dbasecon.inc.php)
header(<?
<A href="mailto:$db=@mysql_connect(“localhost”>$db=@mysql_connect(“localhost”, “manalapan_score”, “score”) or header(“Location:login.php?xc=3112”);
mysql_select_db(“manalapan_score”,$db);
?>)
Second Document: (auth.inc.php)
<?
session_unset(); //unsets all the variables
if (!$db) {
header(“Location: login.php?xc=3112”);
exit();
}
$password=$HTTP_POST_VARS[‘password’];
$login=$HTTP_POST_VARS[‘login’];
//authentication sql to the dbase
$authsql= “Select *
From users_tour a1 where
(password=’$password’)
AND (userid=’$login’)”;
$authquery=@mysql_query($authsql);
$authrow=@mysql_fetch_array($authquery);
$authexist=@mysql_numrows($authquery);
$login_id=$authrow[userid];
header (if ($authexist) {
extract($authrow);
session_start(); //start the session
$authdata=array(“login_id”=>$login);
session_register(‘authdata’);
if (!$PHPSESSID) { //register the sessions if there’s no sessionid
session_register(‘login_id’);
} elseif (!$login_id) { //if any session variable undeclared, register them!
session_register(‘login_id’);
}
//assigns session variables to the form variables!
$login_id=$login;
} else {
header(“Location: login.php?xc=24601”);
exit();
} //endif authexist
?>
Thanks for your help!