I don't have the code as I keep following examples that don't exactly work.
So, here is what I am trying to accomplish:

1: Something similar to what this site uses to reset lost passwords
2: Redirect a user based on url in the table

Any help or direction would be greatly appreciated.


9 Years
Discussion Span
Last Post by nav33n

Can you explain your problem in detail ? Because I have never used reset lost password option of this site. And also, what is redirecting a user based on url in the table ?



I need a way to send a link to a verified email address a link to reset_pw.php, to update the password field.

Redirecting a user:
I would use a form called redirect to check the user access level which would then load the appropiate url. I am unsure how to accomplish everything being new to php.


Well, When a user creates an account, have another field in the table called securitycheck or something. Let it store the hash of user email and his name(or some text)! While sending the link to the email, concat this securitycheck field with the url. When the user clicks the url, check if securitycheck value matches with the one in securitycheck field of the table. Then ask him to update the password field. While updating password field, empty the securitycheck field, so that the user doesn't click this link again and change his password.
I don't know about the access levels and its working. But it should be pretty simple. Get the access level from the table and redirect accordingly.



is there any code that you have on hand that would explain this or show me how to do it? As I am new to php, i understand the concept but how to write the code is beyond me...



I just found that, and it works nicely. However, when I try to change it to work with my current system everything gets messed up. *shrugs*

I will try to play with it some more tomorrow and if I cannot get it to work, I will ask for more help.

I do have another question,
do you know how to use php to download a selected file using a select list? or should I start another thread?


downloading a file is simple. Change the content type and filename.

$data="test data \t test data \t test data \t \n test data \t test data \t test data \t \n";
header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="test.xls"');
echo $data;

That will show a file save dialog box.

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.