Generating random number and send to user’s email

Someone asked me about this, here i thought to share with you all. The code is not the perfect, but important thing is the logic behind it.

You can find the snippet below. The logic is like a maybank2u transaction. You request the code, put it in the database with the user id, and send the random number to user’s email. After that, when the user upload the file, with the code, you check the database. that one in another script after you send the file to upload.

You need to have your php server configured with mail function, else it won’t work.

Code Snippet

Tags:

Wednesday, April 18th, 2007 code snippet, programming

No comments yet.

Leave a comment

Search

 

My Flickr

DSC_3950P4054890P4054887