You are invited to Log in or Register a free Frihost Account!

Password change

Hi, i'm having some problems with a "change password" page.

I've used Dreamweaver to set up and manage the login thingy. I want it as simple as possible.

I have setup a html form with a text field and a submit button.
What i want is, when i press the submit button, i want the text i submitted(into text field) to update a password field in the database. The database field needs to be found accordingly to the primarykey("ID") and the currently logged in user ("MM_Username").

Anyone know how to do it?

I have tried several ways, but none seems to update the field.

I hope what i wrote made sense.

Thanks in advance!
Rather than just give you a piece of code you would have to change to work for your site anyway, it might be better to work with what you've got and then we can find out what is wrong with what you've done so you learn from it.
HeavyVanilla wrote:
Hi, i'm having some problems with a "change password" page.
I hope what i wrote made sense.

Totally did not Smile

Ok the best thing to do is to take it in steps. First try to do it without mysql backend. Just make sure that your post/get is working. Just echo the info that want to submit back as HTML. If that works then make sure that your SQL query in fine. Finally try to hook both together, by doing it in a simple way. Sometimes when code is part of bigger class or project, things can hide problems. So try with simple examples, if your logic works then you should be able to figure out where the problem lies. It is always good idea to add debug code to ensure you can see what exactly is going on when you press that submit button. Sorry I can't be specific since from the little information you have given it is impossible for me to tell what exactly are you trying to achieve. However I hope the above will help little bit.
However I hope the above will help little bit.

Yea, it helped a little, but not as much as i could have hoped.
Anyways, and extra tips is always helpfull.

Using 4-5 hours in a row kinda managed it, it tooked a lot more time than i had expected, but hell, no one ever said it was gonna be easy learning php Very Happy

Now, the only thing left is debugging, and sadly there only the hard way to do it Rolling Eyes

But, anyway, thanks for the answers Wink
Related topics
Ive been locked out of my own cPanel!!!
TWO Problems, Password lost and diskspace :-(
Domains setup (Server 1)
Directadmin Server 2 Problems
phpBB 2.0.20 RELEASED
How to Make A PHP Portal.
A good webmail client for multiple users
Password Recovery
Password Change!
[Password Change Needed] Can't open my cpannel
Cpanel password change screwed up
Change password and forgot password script
Windows 8 log in password change
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

© 2005-2011 Frihost, forums powered by phpBB.