Page opens like this....
phone:123243453
email:henria@re al.com
but aftr clicking that button
I need to display like this..
phone:12324****
email:hen***@** ****
Error on this line:::
dim textsize=Len(te xt)
Expected end of statement
Can any1 suggest how to proceed..??
[code=asp]<%
Function getPhone(text)
dim textsize=Len(te xt)
text = Left(text,5)
For index = 0 to textsize
text &= "*"
Next
return text
End Function
Function getEmail(text)
dim textsize=Len(te xt)
dim atpos = text.IndexOf("@ ") - 5
text = Left(text,5)
For index = 0 to textsize
if atpos = index+1 then
text &= "@"
else
text &= "*"
endif
Next
return text
End Function
id = 1
sSql = "SELECT phone,email FROM nametable WHERE userID = " & id
oRs.Open sSql, oConn
While not oRs.EOF
Response.write( "<table><tr><fo rm method='post'>< td >phone : </td><td>"&getPho ne(ors(0))&"</td><td width='10%'alig n='right'mail :</td><td>"&getEma il(ors(1))&"</td><inputname=' submit' type='submit' value='check'></form></tr></table>")
oRs.MoveNext()
Wend
%> [/code]
phone:123243453
email:henria@re al.com
but aftr clicking that button
I need to display like this..
phone:12324****
email:hen***@** ****
Error on this line:::
dim textsize=Len(te xt)
Expected end of statement
Can any1 suggest how to proceed..??
[code=asp]<%
Function getPhone(text)
dim textsize=Len(te xt)
text = Left(text,5)
For index = 0 to textsize
text &= "*"
Next
return text
End Function
Function getEmail(text)
dim textsize=Len(te xt)
dim atpos = text.IndexOf("@ ") - 5
text = Left(text,5)
For index = 0 to textsize
if atpos = index+1 then
text &= "@"
else
text &= "*"
endif
Next
return text
End Function
id = 1
sSql = "SELECT phone,email FROM nametable WHERE userID = " & id
oRs.Open sSql, oConn
While not oRs.EOF
Response.write( "<table><tr><fo rm method='post'>< td >phone : </td><td>"&getPho ne(ors(0))&"</td><td width='10%'alig n='right'mail :</td><td>"&getEma il(ors(1))&"</td><inputname=' submit' type='submit' value='check'></form></tr></table>")
oRs.MoveNext()
Wend
%> [/code]
Comment