The login form
<form id="login" name="login" method="POST" action="'.$loginFormAction.'">
<span class="tagline">Member Login </span> <br />
<input name="name" type="text" id="name" value="Name" onFocus="if(this.value == \'Name\'){ this.value = \'\'; }" />
<br />
<input name="pass" type="password" id="pass" value="password" onFocus="if(this.value == \'password\'){ this.value = \'\'; }" />
<br />
<input type="submit" name="button" id="button" value="Login" />
</form>
The login script ( $loginFormAction )$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['name'])) {
$loginUsername=$_POST['name'];
$password= md5($_POST['pass']);
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "members/index.php";
$MM_redirectLoginFailed = "inc/failed.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_DBcifarewell, $DBcifarewell);
$LoginRS__query=sprintf("SELECT name, pass FROM members WHERE name=%s AND pass=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $DBcifarewell) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
// header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
As you can see the success location is members/index.php, but the xhtml output for the form action comes out wrong for some reason in the form and I am getting:<form id="login" name="login" method="POST" action="/pf2/index.php">
<span class="tagline">Member Login </span> <br />
<input name="name" type="text" id="name" value="Name" onFocus="if(this.value == 'Name'){ this.value = ''; }" />
<br />
<input name="pass" type="password" id="pass" value="password" onFocus="if(this.value == 'password'){ this.value = ''; }" />
<br />
<input type="submit" name="button" id="button" value="Login" />
</form>
Can anyone see the reason please?
ta muchly
