943,746 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 453
  • PHP RSS
Aug 11th, 2009
0

username and passwor protected webpage using php and mysql

Expand Post »
Hello im juner, a new php developer, i already finished with a register.php, login.php file. My problem is when the main.php is accessable after login by correct username and password stored in mysql database, the main.php composed of the following link:
changepassword.php
addsponsor.php
deletesponsor.php

when i click the changepassword.php link then the changepassword.php is not protected with the inputted username and password in login.php.

what i am asking now is, is there anybody has the idea with this problem? im about a month of searching in the internet but i never found a solution so help me.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
juner4 is offline Offline
3 posts
since Aug 2008
Aug 11th, 2009
0

Re: username and passwor protected webpage using php and mysql

are you asking about how to send user name and password to server with security ?
Reputation Points: 165
Solved Threads: 59
Posting Pro in Training
DangerDev is offline Offline
485 posts
since Jan 2008
Aug 11th, 2009
0

Re: username and passwor protected webpage using php and mysql

If you want changepassword to be able to check and/or change the password then you will need to make the current id and password available or at least set a flag to show that the user is properly logged in. You will want to save this as a SESSION variable so you can access it in any module that needs it.
Reputation Points: 210
Solved Threads: 228
Nearly a Posting Virtuoso
chrishea is offline Offline
1,389 posts
since Sep 2008
Aug 11th, 2009
0

Re: username and passwor protected webpage using php and mysql

Yes what i want is to send the username and password to the changepassword.php without another login because that case i already logged in main.php which composed of the changepassword.php link. when i click the changepassword link the username and password will be send also for the security of the changepassword.php link.

i am hoping for your help. thank for the reply.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
juner4 is offline Offline
3 posts
since Aug 2008
Aug 12th, 2009
0

Re: username and passwor protected webpage using php and mysql

during changing password you dont have to send user name and password to client, instead just ask current password and new password to the user, take those password to server and validate the current password, if current password is matching, reset the new password.
Reputation Points: 165
Solved Threads: 59
Posting Pro in Training
DangerDev is offline Offline
485 posts
since Jan 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Preventing an SQL injection
Next Thread in PHP Forum Timeline: Developing a cake php application





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC