Azercii Posted July 7, 2014 Share Posted July 7, 2014 After getting my site hacked, I'm not really up for learning PhP, so I'm trying to use uMScript. On the demo site, and when I just load up the files on my server, it will redirect upon log in. But when I then use my styling, for some reason the login_submit.php gives me a blank page and does not redirect, nor does it log the user in. I don't change anything except the positioning of the forum and the container around it, no PhP or JS changes, weird?I can not seem to get a hold of the creator, nor can I find a user script that matches what I'm looking for. Heck, I'm so close to going mad, I'm even willing to pay someone to do the user PhP for me haha Has anyone used this script successfully? You can try it out here: http://mod-universe.com/index.php Demo: http://www.venturehapa.biz/umscript/demo/index.php (I couldn't get the demo credentials to log in, created a new user = Okriani, kieran09) Quote Link to comment https://forums.phpfreaks.com/topic/289499-umscript-not-logging-in/ Share on other sites More sharing options...
mac_gyver Posted July 7, 2014 Share Posted July 7, 2014 there could be dozens of different things that could cause any script to not work as expected. you will always need to determine what IS happening in order to find where the problem is at in order to fix it. since the code on your site is running and gives the various status messages for empty/wrong user credentials, the problem is in the login() function or in the value it returns to the login_submit.php code. the login() function has a foo-bar/nonsense/non-finished-work problem. it doesn't return any of the expected values if $row['level_access'] == 2 isn't true. i'm guessing the login credentials you have posted and are using are for an admin level ( level_access == 1) user and not a user level user? (using the hard-coded 2 and 1 values for users/admins is another sign the code wasn't written very well. you would normally use defined constants with meaningful names for such values so that the code becomes self documenting.) the code should have been written to allow any person to log in using their credentials. then on any page you would use the level_access value to determine what to, well, allow access to. the code currently causes an admin to fail to login on the user pages, without telling them why the code didn't log them in. this is a usability no no, you must always provide some feedback to the user, even if it is a default - sorry the code screwed up and could not perform the requested operation. you may in fact want/need to re-authenticate an admin before allowing him to perform critical actions on the admin pages, but you would do that using just the login function (properly written), not make a separate adminLogin function. this code is just more of the crap code that's posted on the Internet. Quote Link to comment https://forums.phpfreaks.com/topic/289499-umscript-not-logging-in/#findComment-1484065 Share on other sites More sharing options...
Azercii Posted July 7, 2014 Author Share Posted July 7, 2014 Looks like it's back to the drawing board then? I can understand a little PhP, but I can't understand how to do things with user forms. I'm not sure how to put it without sounding ridiculous lol if you gave me a login script and said "I want you to use this on your site, change what's needed and echo out any information for the user", I'd know how it functioned and where errors lie, where to change and what not to touch etc. But if I were to create my own, I wouldn't even know where to begin Do you have any sites that you can recommend that would help me along that path? Quote Link to comment https://forums.phpfreaks.com/topic/289499-umscript-not-logging-in/#findComment-1484124 Share on other sites More sharing options...
mac_gyver Posted July 7, 2014 Share Posted July 7, 2014 the only recommendation i can give is to learn enough of the language (through reading documentation and actually practicing/building small functional scripts) so that you can both identify what code is doing, so that you can determine if it meets your needs and so that you can debug what it is doing, and so that you can write or change code to do what you want. Quote Link to comment https://forums.phpfreaks.com/topic/289499-umscript-not-logging-in/#findComment-1484150 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.