Jump to content


Photo

Login Problems- Im stumped


  • Please log in to reply
1 reply to this topic

#1 Plazman65

Plazman65
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 23 March 2006 - 11:04 PM

Hi all,
Ok I'm new, and I am using DW8,not ready for hand coding yet.
I made a big newbie error and I was plugging away and only checking in IE6, I promise to never to do it again!
Can someone check this and see if you see anything that would cause this, in firefox it logs u in great but in ie6 and opera you go to the forgotten pw page.
heres the code or the link-


<?php require_once('../Connections/jobs.php'); ?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}

$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}

if (isset($_POST['textfield'])) {
$loginUsername=$_POST['textfield'];
$password=$_POST['textfield2'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "../homepage.php";
$MM_redirectLoginFailed = "forgot_password.php";
$MM_redirecttoReferrer = true;
mysql_select_db($database_jobs, $jobs);

$LoginRS__query=sprintf("SELECT username, password FROM login WHERE username='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));

$LoginRS = mysql_query($LoginRS__query, $jobs) 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']) && true) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>alaska city jobs</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="mm_lodging1.css" type="text/css" />
<style type="text/css">
<!--
.style1 {
color: #336666;
font-size: 10px;


</style>
<link href="../../../htdocsmm_lodging1.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
@import url("../mm_lodging1.css");
-->
</style>
<link href="../mm_lodging1.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {
font-size: 10px;
font-family: Arial, Helvetica, sans-serif;
}
.style5 {font-size: 10px}
-->
</style>
</head>
<body bgcolor="#999966">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!--DWLayoutTable-->
<tr>
<td width="28" height="109" nowrap="nowrap"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td colspan="8" valign="middle" nowrap="nowrap" class="logo"><a href="../homepage.php"><img src="../IMAGES/banner_graphic.png" width="1024" height="109" border="0" /></a><br /></td>
<td width="4">&nbsp;</td>
<td width="52">&nbsp;</td>
</tr>
<tr bgcolor="#ffffff">
<td height="1" colspan="11"><img src="IMAGES/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr>
<tr bgcolor="#a4c2c2">
<td width="28" height="79" nowrap="nowrap">&nbsp;</td>
<td width="122" valign="middle" id="navigation"><span class="style1 style5"><strong>MY DEPARTMENTS</strong></span> <span class="sidebarText style5">&nbsp;</span><span class="sidebarText"> &nbsp;&nbsp;&nbsp; </span></td>
<td colspan="2" align="center" valign="middle" id="navigation"><a href="../gettinghired.php">GET HIRED</a></td>
<td width="95" valign="middle" class="sidebarText style2" id="navigation"><a href="../equipment.php">EQUIPMENT</a></td>
<td width="82" valign="middle" class="style1" id="navigation"><a href="../inthenews.php">IN THE NEWS</a></td>
<td width="100" align="center" valign="middle" class="style2 sidebarText" id="navigation"><a href="../mydepartment/mydepartments.php">FORUM</a></td>
<td width="395" valign="middle" class="style2 sidebarText" id="navigation"><a href="../membershipservices/recommendedreading.php">RECOMMENDED READING</a></td>
<td width="158" valign="middle" class="sidebarText" id="navigation"><a href="../membershipservices/contactus.php">CONTACT US</a><a href="../inthenews.php" class="style1"></a> </td>
<td>&nbsp;</td>
<td valign="middle"><p>&nbsp;</p></td>
</tr>
<tr bgcolor="#ffffff">
<td height="1" colspan="11"><img src="IMAGES/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr>
<tr bgcolor="#ffffff">
<td height="352" colspan="3" valign="top" bgcolor="#a4c2c2"><img src="IMAGES/mm_lodging_image.jpg" alt="Home Page Image" width="230" height="240" border="0" />
<table border="0" cellspacing="0" cellpadding="0" width="230">
<tr>
<td width="15">&nbsp;</td>
<td width="200" class="sidebarText" id="padding"><br />
&nbsp;<br /> </td>
<td width="15">&nbsp;</td>
</tr>
</table></td>
<td colspan="2" valign="top"><img src="IMAGES/mm_spacer.gif" alt="" width="50" height="1" border="0" /></td>
<td colspan="4" valign="top"><br />
<br />
<table border="0" cellspacing="0" cellpadding="0" width="600">
<tr>
<td colspan="2" class="pageName">&nbsp;</td>
<td width="170" class="pageName">&nbsp;</td>
</tr>
<tr>
<td width="245" class="bodyText"><form ACTION="<?php echo $loginFormAction; ?>" id="form2" name="form2" method="POST">
<span class="sidebarText">USERNAME</span>
<label>
<input type="text" name="textfield" />
<br />

<a href="forgot_username.php">FORGOT YOUR USERNAME?</a> <br />
<br />
<span class="sidebarText">PASSWORD</span>
<input type="password" name="textfield2" />
</label>
<label> <br />
<a href="forgot_password.php">PASSWORD HELP? </a></label>
<label><br />
</label>
<input name="LOG IN" type="submit" id="LOG IN" value="Login" />
</form>
<p align="right">&nbsp; </p>
<br /> </td>
<td width="185" class="bodyText">&nbsp;</td>
<td class="bodyText">&nbsp;</td>
</tr>
</table>
</form>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr bgcolor="#ffffff">
<td height="1" colspan="11"><img src="IMAGES/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr>
<tr>
<td width="28" height="19">&nbsp;</td>
<td>&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="4">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>

#2 Plazman65

Plazman65
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 24 March 2006 - 01:31 AM

Never mind guys I got it, Michelle





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users