Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Dreamweaver (all versions)
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 1st, 2003, 01:15 PM
Registered User
 
Join Date: Dec 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how do I allow my users to change passwords?

I've created a login page in Dreamweaver MX that successfully works. I've also created the SQL database behind it with everyone's username and password, but I want to allow them to change the password if they'd like. I need a dreamweaver extension or a vbscript that will show me how to do this. Can anyone help?

Judi

 
Old December 1st, 2003, 01:38 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It shouldn't be too difficult to do this yourself.

Create a form with 3 password boxes. The first is to enter the old password, the second and third are for the new password.

When the form is submitted, check wether the second and third password match your password rules, and that they are the same.

Next, you should update the password. The simplest thing to do is to pass an update statement to the database that sets the new password and uses this WHERE clause:

WHERE UserID = YourUserID AND Password = OldPassword

The disadvantage is is that you can't be sure your UPDATE query returned a record. So, if the old password was correct, the update didn't take place.

You can either get the number of updated records from the database through some code, or you should execute a SELECT statement first. This statement checks whether there is a user with the right UserID and old password. If the user exists, you can pass the UPDATE statement to the database.

If you need any help with some specific tasks, please let me know through this list.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old December 1st, 2003, 02:09 PM
Registered User
 
Join Date: Dec 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Although this makes sense, I don't know enough programming to actually write this out in code.

 
Old December 1st, 2003, 02:51 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Right, I see.

I am not going to write the entire program for you, but if you're willing to invest some time to learn how to do this, I'll help you.

What kind of database are you using now? And what version of Dreamweaver? MX? 2004?

I think the easiest way to get a skeleton for your code is to use the Record Update Form that you can find under the Insert | Application Objects | Update Record.

Just have the form point to your Users table, and make sure you select at least the password column.

Then modify the code by adding the second and third password fields. You'll also need to modify the UPDATE statement that Dreamweaver has generated.

If I were you, I'd play around with this form for a while. Look at how the UPDATE statement works, look at the HTML for the form, etc. Also, search Google: http://www.google.com/search?hl=en&i...ection&spell=1

Finally, you could get a copy of Beginning Dreamweaver MX. The book discusses all the database techniques you need for projects like this.

Again, for more help, feel free to post here.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Accepting Passwords in C++ aix_kernel C++ Programming 0 August 9th, 2008 12:58 AM
Where and how to store encrypted passwords usprasad_m Visual C++ 2005 0 December 15th, 2006 07:01 AM
Passwords sampow Access 6 February 10th, 2004 02:51 PM
Change passwords in another workgroup Steven Access 0 July 2nd, 2003 07:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.