Forum Moderators: open
I am developing an asp site where I need to generate a unique number with alphabetic characters as user name (eg. M123412001 when other person registering his user name should be M123412002 and next M123412003 etc...) and password (with or without numbers) when one new user is registering the site and this user name and password have to send him to his email address automatically when all these process got over.
I just want to know how to do this using asp with access db?
2.split the name to 'M' and the right number.
M and 12342008
number=clng((right(name,8))
3.add 1 to the number.
number=number+1
4.reconstruct a name, such as newname="M"&cstr(number)
ok!
As for password: random generation.
Send email:
<%
SUB sendMail( fromWho, toWho, Subject, Body )
DIM myMail
SET myMail = Server.CreateObject("CDONTS.Newmail")
myMail.From = fromWho
myMail.To = toWho
myMail.Subject = Subject
myMail.Body = Body
myMail.Send
SET myMail = Nothing
END SUB
fromWho=email
toWho="mail@xxx.com"
Subject="xxxxxxxx"
Body = mbody
sendMail fromWho, toWho, Subject, Body