Posted: Thu Dec 11, 2003 6:46 am
might help if you show us the code that you have now updated
Mark
Mark
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
// *** Start the session
session_start();
// *** Validate request to log in to this site.
$FF_LoginAction = $_server['PHP_SELF'];
if (isset($_server['QUERY_STRING']) && $_server['QUERY_STRING']!="") $FF_LoginAction .= "?".htmlentities($_server['QUERY_STRING']);
if (isset($_post['username'])) {
$FF_valUsername=$_post['username'];
$FF_valPassword=$_post['password'];
$FF_fldUserAuthorization="";
$FF_redirectLoginSuccess="/content/template.htm";
$FF_redirectLoginFailed="/content/tractor_series/the_range/6140_6185/6140_6185_1.htm";
$FF_rsUser_Source="SELECT id, password ";
if ($FF_fldUserAuthorization != "") $FF_rsUser_Source .= "," . $FF_fldUserAuthorization;
$FF_rsUser_Source .= " FROM ibf_members WHERE id='" . $FF_valUsername . "' AND password='" . $FF_valPassword . "'";
mysql_select_db($database_LaptopDB, $LaptopDB);
$FF_rsUser=mysql_query($FF_rsUser_Source, $LaptopDB) or die(mysql_error());
$row_FF_rsUser = mysql_fetch_assoc($FF_rsUser);
if(mysql_num_rows($FF_rsUser) > 0) {
// username and password match - this is a valid user
$MM_Username=$FF_valUsername;
$_session("MM_Username");
if ($FF_fldUserAuthorization != "") {
$MM_UserAuthorization=$row_FF_rsUser[$FF_fldUserAuthorization];
} else {
$MM_UserAuthorization="";
}
$_session("MM_UserAuthorization");
if (isset($accessdenied) && false) {
$FF_redirectLoginSuccess = $accessdenied;
}
mysql_free_result($FF_rsUser);
$_session("FF_login_failed");
$FF_login_failed = false;
header ("Location: $FF_redirectLoginSuccess");
exit;
}
mysql_free_result($FF_rsUser);
$_session("FF_login_failed");
$FF_login_failed = true;
header ("Location: $FF_redirectLoginFailed");
exit;
}
?>Code: Select all
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="POST" action="<?php echo $FF_LoginAction?>">
<input name="username" type="text">
<input name="password" type="text">
</form>
</body>
</html>Code: Select all
print $_post['username'];the vars wont pass (seems a little linear to me<form name="form1" method="POST" action="<?php echo $FF_LoginAction">
Code: Select all
<form name="form1" method="POST" action="<?php echo $FF_LoginAction">Code: Select all
<form name="form1" method="POST" action="<?php echo $FF_LoginAction; ?>">Code: Select all
session_start();
$_SESSION['username'] = $_POST['username'];Code: Select all
print $username