vasoftwaresolutions Posted February 26, 2008 Share Posted February 26, 2008 For some reason this will not let me login.. you can see the error if you login here is the page.. http://globalskyairlines.com/pilots user = BLUE101 password = 833699 thanks for any help! here is my source <?php $hostname = "localhost"; $database = "globalsky_bluehawaiian"; $username = "bluehawaiian"; $password = "8336994895"; $vrbo = mysql_connect($hostname, $username, $password) or die(mysql_error()); ?> <?php // *** Validate request to login to this site. if (!isset($_SESSION)) { session_start(); } $loginFormAction = $_SERVER['PHP_SELF']; if (isset($_GET['accesscheck'])) { $_SESSION['MM_redirectLoginSuccess'] = $_GET['accesscheck']; } if (isset($_POST['username'])) { $username=$_POST['username']; $password=$_POST['password']; $MM_fldUserAuthorization = ""; $MM_redirectLoginSuccess = "overview.php"; $MM_redirectLoginFailed = "index.php?M=Login Failed"; $MM_redirecttoReferrer = false; mysql_select_db($database, $vrbo); $LoginRS__query=sprintf("SELECT callsign, password FROM pilots WHERE callsign=%s AND password=%s", GetSQLValueString($username, "text"), GetSQLValueString($password, "text")); $LoginRS = mysql_query($LoginRS__query, $vrbo) or die(mysql_error()); $loginFoundUser = mysql_num_rows($LoginRS); if ($loginFoundUser) { $loginStrGroup = ""; //declare two session variables and assign them $_SESSION['MM_Username'] = $username; $_SESSION['MM_UserGroup'] = $loginStrGroup; if (isset($_SESSION['MM_redirectLoginSuccess']) && false) { $MM_redirectLoginSuccess = $_SESSION['MM_redirectLoginSuccess']; } header("Location: " . $MM_redirectLoginSuccess ); } else { header("Location: ". $MM_redirectLoginFailed ); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Blue Hawaiian Login</title> <style type="text/css"> <!-- .style1 {color: #C0C0C0} --> </style> </head> <body> <span class="style1"><br /> </span><br /> <br /> <form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>"> <table width="100%" border="0"> <tr> <td>Callsign:</td> <td><label> <input type="text" name="Username" id="Username" /> </label></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="password" id="password" /></td> </tr> <tr> <td height="23"> </td> <td> </td> </tr> <tr> <td height="23"> </td> <td><label> <input type="submit" name="button" id="button" value="Login" /> </label></td> </tr> </table> </form> </body> </html> Quote Link to comment Share on other sites More sharing options...
peranha Posted February 26, 2008 Share Posted February 26, 2008 I do not receive an error when trying to login, also at the end of you last post put a / in front of the word code. Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 26, 2008 Share Posted February 26, 2008 In your form, find: <input type="text" name="Username" id="Username" /> replace with: <input type="text" name="username" id="username" /> Quote Link to comment Share on other sites More sharing options...
vasoftwaresolutions Posted February 26, 2008 Author Share Posted February 26, 2008 its suppost to redirect to overview.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.