Jump to content

Teach Me

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Teach Me's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. HELP PLEASE... Heres the problem, I have set up a website that requires a login script. I have used Dreamweaver to build the site from scratch, so there for it seemed only natural to use the PHP Login script that comes with Dreamweaver. I have followed the instructions and all works well......Apart from a very strange problem! Users can register their details through a register page, that in turn copies the info to MySQL..this works fine, all the info seems to be recorded correctly. You should now be able to login with this info, (heres where it gets weird). Some users can login OK yet others cannot get in at all. I have checked the data in MySQL and all seems fine..VERY STRANGE. Here is the PHP Code as it is at the moment. <?php require_once('Connections/login.php'); ?> <?php mysql_select_db($database_login, $login); $query_log = "SELECT * FROM fantasyf1_users"; $log = mysql_query($query_log, $login) or die(mysql_error()); $row_log = mysql_fetch_assoc($log); $totalRows_log = mysql_num_rows($log); ?> <?php // *** Validate request to login to this site. session_start(); $loginFormAction = $_SERVER['PHP_SELF']; if (isset($accesscheck)) { $_SESSION['PrevUrl'] = $accesscheck; } if (isset($_POST['user_name'])) { $loginUsername=$_POST['user_name']; $password=$_POST['password']; $MM_fldUserAuthorization = ""; $MM_redirectLoginSuccess = "fantasyf1pages/loginsuccess.php"; $MM_redirectLoginFailed = "fantasyf1pages/logindenied.php"; $MM_redirecttoReferrer = false; mysql_select_db($database_login, $login); $LoginRS__query=sprintf("SELECT name, password FROM fantasyf1_users WHERE name='%s' AND password='%s'", get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password)); $LoginRS = mysql_query($LoginRS__query, $login) 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 ); } } ?> I hope I can find a solution soon....
  2. I have succesfully used Dreamweaver MX to create login access to a website, I am however experiencing problems with the access to this site. After registration you are guided back to the login page, if you then enter the login details some users are still denied access. MySQL is recording the information from the register page OK, but for some reason there are users that still cannot gain access to the site, yet other users have no such problems. I have even altered the information directly within MySQL using PHPMyAdmin to remove uppercase characters etc. to see if this was a problem, but nothing seems to work. In one instance a user tried with 7 different usernames and passwords but none would work. As a newbie to PHP is there a common problem with the Dreamweaver MX scripting that creates such problems as above
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.