skoobi Posted March 19, 2010 Share Posted March 19, 2010 Hi im getting this error with a login script i have... It works on my other server but not on the one im on now... Heres the error: 'Notice: Undefined index: Login in ***\admin\enquiry\index.php on line 12' This is the code for the login at the top of the page: <? // Use session variable on this page. This function must put on the top of page. session_start(); ////// Logout Section. Delete all session variable. session_destroy(); $message=""; ////// Login Section. $Login=$_POST['Login']; if($Login){ // If clicked on Login button. $username=$_POST['username']; $md5_password=md5($_POST['password']); // Encrypt password with md5() function. require_once 'conContact.php'; mysql_connect($host,$db_user,$db_password); mysql_select_db($database); // Check matching of username and password. $result=mysql_query("select * from members where username='$username' and password='$md5_password'"); if(mysql_num_rows($result)!='0'){ // If match. session_register("username"); // Craete session username. header("location:main.php"); // Re-direct to main.php exit; }else{ // If not match. $message="<img src=\"images/warning_logon.png\" width=\"20\" height=\"17\" /> Incorrect Username or Password"; } var_dump($_SESSION['username']); } // End Login authorize check. ?> I cant figure it oout it works on 1 server but not the other.. . Nothing has changed either... Any help would be appreciated Cheers Chris Link to comment https://forums.phpfreaks.com/topic/195778-notice-undefined-index-login-in/ Share on other sites More sharing options...
skoobi Posted March 19, 2010 Author Share Posted March 19, 2010 Ok i think its solved... The server that it works on has register_globals = enabled and the other doesnt.. Link to comment https://forums.phpfreaks.com/topic/195778-notice-undefined-index-login-in/#findComment-1028487 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.