OK. I have used TechTuts user system tutorials to make a user system. But I need a code that will check if the password on that account is changeme. And if it is, redirect them to the password change page. Reputation will be awarded! KKTHNX.
Printable View
OK. I have used TechTuts user system tutorials to make a user system. But I need a code that will check if the password on that account is changeme. And if it is, redirect them to the password change page. Reputation will be awarded! KKTHNX.
Hey i don't think you really need that script, because if the person has anybrains what so ever he/she will change there password anyway.
-Daza
No it's a school thing. I'm making the accounts. So when they login I need them to change their password.
Oh i hate school things they have to be so difficult.
-Daza
Tell me about it.
Since the password is encrypted its all most impossible.
I'm assuming that the user logs in and the variable of the field where they type the pass is "pass". Just put this as the first thing in your PHP on the page where the user goes when they log-in, and it should work depending on the script etc.
If it doesn't work post the script here, or link to the site and I'll try and work something out to fit in with your site.PHP Code:if($_POST['pass'] == 'changeme') {
header('location: http://www.google.com');
die();
}
How are the posts stored in the database?
i mean is it just text so "changeme" or the md5 hashed "changeme" or possibly a custom algorthum "/
If you need to fish the pass out of a database it will almost certainly be encrypted.
You could have a table in the mysql called oldpass and newpass
then you could compair them and if they match it would say bleh bleh bleh. You could do that by editing Nets if/else code.