Click here to Skip to main content
15,905,229 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

i am trying to develop a password recovery system, where when the user click on the "forgot you password" link, it generates a random number to the user's email and the user gets verified.

i have successfully written the code in c# that generates the random number and sends it to the user's email but am now trying to figure out how to save the random number that was generated into the database.

Thanks in advance
Posted
Updated 2-Apr-14 13:39pm
v2
Comments
PIEBALDconsult 2-Apr-14 20:59pm    
Save it to the database first, maybe make sure it also has a time limit, and can only be used once.
Member 10658074 3-Apr-14 4:48am    
Hi, that's what i plan to do but don't have a clue how to go about it.
ZurdoDev 2-Apr-14 21:28pm    
Where are you stuck? Interacting with a database is trivial and in most applications.
Member 10658074 3-Apr-14 4:52am    
Hello,
i am generating a random number then emailing it to a user who then inputs it in a another form for verification, if the numbers are the same the user is allowed to access the next form, the problem now is i want to save the random numbers that are generated, put a time limit with restrictions that allows a user to create a random number only twice in a day and i dont know how to do that.
At the moment i can generate the random number and send to an email.
ZurdoDev 3-Apr-14 7:04am    
Do you know how to write to a db?

1 solution

Use sql insert, refer:
Using Parameterized queries
[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900