peranha Posted September 22, 2008 Share Posted September 22, 2008 Your else statement at the bottom of the page got changed somehow to this else{    header("location:./");    exit(); } delete everything in front of header, and exit. Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 Ok, now when I go to the change password page, it redirects me to index.php which I do not want. Any reason? Link to comment Share on other sites More sharing options...
jonsjava Posted September 22, 2008 Share Posted September 22, 2008 it means the password got changed properly! yay! Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 No... http://delta.bluespacetechnologies.com/~bucketho/admin/change_password.php?pass_change_form=true I mean look. When you click on it, I cant even change my password, it goes back to index.php for some reason? Link to comment Share on other sites More sharing options...
jonsjava Posted September 22, 2008 Share Posted September 22, 2008 Ok, that means that the error check says that the $_SESSION['is_valid'] does not equal true. Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 So what link should I use to change the password? Link to comment Share on other sites More sharing options...
Stryves Posted September 22, 2008 Share Posted September 22, 2008 Login first, then try to change the password Link to comment Share on other sites More sharing options...
jonsjava Posted September 22, 2008 Share Posted September 22, 2008 ok, can you give me FTP to the site? if that's not doable, that's ok. I'm at the end of my troubleshooting from this side. it works perfectly for me, and I really can't spend more time on it. Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 Well, the problem is instead of staying on the page it is redirecting to index.php Is there a code I can take out so it doesnt do that. Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 I need like 10 more minutes with you. You have been a great help and I would not like to stop it right at the end. Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 Also, you have 2 posts until 1000 It would be a great achievement. Link to comment Share on other sites More sharing options...
jonsjava Posted September 22, 2008 Share Posted September 22, 2008 Ok, here's the logic of the code: "If they are asking for the password change form, and they are logged in, show it to them. If they are asking to post the changes, and they are logged in, and the password and password verification match, and the old password matches up with what we have for the user, then change it. If they are logged in, and they messed up, tell them so. If they are not logged in, send them to the index. If they password change succeeds, send them to the index" Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 I am trying to test the change password. But when I land on the change password page to change it, it instead redirects me to index.php Link to comment Share on other sites More sharing options...
Stryves Posted September 22, 2008 Share Posted September 22, 2008 Because you are not logged in. Login to the site, then access that page. If you are not logged in, why would you be able to change a password? Link to comment Share on other sites More sharing options...
jonsjava Posted September 22, 2008 Share Posted September 22, 2008 that means (according to the afore mentioned logic) that it does not see you as logged in. Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 Hu? So what should I do to change my password when I am logged in? Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 This is really starting to annoy me... Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 Like the reason I have the change password is because, incase the person wants to change there password via admin panel they can. Instead of going into the database. (Like me) Link to comment Share on other sites More sharing options...
Stryves Posted September 22, 2008 Share Posted September 22, 2008 Slow down, programming without patience is impossible. Login to your website, and then go to this paste this into the URL. http://delta.bluespacetechnologies.com/~bucketho/admin/change_password.php?pass_change_form=true It will ONLY display the password change to someone who is logged in, to prevent people from changing other users passwords. Link to comment Share on other sites More sharing options...
genericnumber1 Posted September 22, 2008 Share Posted September 22, 2008 He put in a ton of work with you, give him a break, he did 10x more than I would have. Look up each line of code, figure out how they work, find any flawed logic and fix it. That too much work? too bad, it's how you learn. You don't seem to be looking for help learning, you seem to be looking for charity handouts, which I hate to say, doesn't happen here. Link to comment Share on other sites More sharing options...
jonsjava Posted September 22, 2008 Share Posted September 22, 2008 I'm logged in to his site (for testing purposes), and I'm getting the same issue he is, which means that when he's logging in, it's not setting the $_SESSION['is_valid']. That's the only way we would get this error *sigh...got work to do...hope you guys can figure this out for him, and let me know the outcome, please* Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 Stry, I am logged in, how I know is because to access index.php you have to login, and I am on index.php... That means I am logged in. Then when I go to the page you told me, it redirects me to index.php immediately. Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 Yep, I ain't a programmer like him. Link to comment Share on other sites More sharing options...
sith717 Posted September 22, 2008 Author Share Posted September 22, 2008 So hopefully someone can finish up that script for me. Link to comment Share on other sites More sharing options...
jonsjava Posted September 22, 2008 Share Posted September 22, 2008 OK, let me explain something: It *is* a complete script. The fact you can't get it working has nothing to do with my coding. It has everything to do with how the session is being passed on, and you have been told this countless times. You *might* want to check your scripts, and make sure that session_start() is at the top of the pages that this script touches. Link to comment Share on other sites More sharing options...
Recommended Posts