jayerpelo Posted October 11, 2013 Share Posted October 11, 2013 can someone help me with my problem configuring mysql? thank you in advance Quote Link to comment https://forums.phpfreaks.com/topic/282884-php-config/ Share on other sites More sharing options...
Ch0cu3r Posted October 11, 2013 Share Posted October 11, 2013 Well that screenshot has nothing to do with MySQL. The errors in the screenshot is from PHP. The undefined index errors are caused because the script is trying to access an associative array with an index that doesn't exist. This is due to the scripts poor coding. There is probably code like if($some_var['some_index']) { // do something } Which should be if(isset($some_var['some_index'])) { // do something } Quote Link to comment https://forums.phpfreaks.com/topic/282884-php-config/#findComment-1453522 Share on other sites More sharing options...
jayerpelo Posted October 11, 2013 Author Share Posted October 11, 2013 this is the code example for Notice: Undefined index: submit in C:\wamp\www\payroll\index.php on line 39, can you help me sir via teamviewer? if($_POST['submit']=='Login'){ // Checking whether the Login form has been submitted $err = array(); // Will hold our errors if(!$_POST['username'] || !$_POST['password']) $err[] = 'All the fields must be filled in!'; if(!count($err)) { $_POST['username'] = mysql_real_escape_string($_POST['username']); $_POST['password'] = mysql_real_escape_string($_POST['password']); $_POST['rememberMe'] = (int)$_POST['rememberMe']; // Escaping all input data $row = mysql_fetch_assoc(mysql_query("SELECT * FROM user WHERE username='{$_POST['username']}' AND password='".md5($_POST['password']."NizarRahmat")."'")); if($row['username']) { // If everything is OK login $_SESSION['blocked'] = $row['blocked']; // Store some data in the session if($_SESSION['blocked'] == 0) { $_SESSION['userid']= $row['userid']; $_SESSION['username'] = $row['username']; $_SESSION['accessid'] = $row['accessid']; $_SESSION['rememberMe'] = $_POST['rememberMe']; setcookie('tzRemember',$_POST['rememberMe']); } else $err[]='User is blocked! please contact Administrator!!'; } else $err[]='Wrong username and/or password!'; } if($err) $_SESSION['msg']['login-err'] = implode('<br />',$err); // Save the error messages in the session header("Location: index.php"); exit;} Quote Link to comment https://forums.phpfreaks.com/topic/282884-php-config/#findComment-1453525 Share on other sites More sharing options...
Ch0cu3r Posted October 11, 2013 Share Posted October 11, 2013 The solution would be to either learn PHP and fix the problem yourself, or find a better script that is coded properly or pay someone to fix the script for you. Quote Link to comment https://forums.phpfreaks.com/topic/282884-php-config/#findComment-1453530 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.