Find the record in data base by name
Find the record in data base by name
Rate Find the record in data base by name
(3(3 Vote))
<body>
<form action="search.asp" method="get/post">
Enter the first name<input type=text name=t1>
<input type=submit value="Show">
----------------------------------
<%
'Asp code
name=request.querystring("t1")
'connecting to data base
set cn=server.createobject("adodb.connection")
set rs=server.createobject("adodb.recordset")
cn.open "dsn=mcs225;uid=admin;pws=";
'Data base connected
set rs=cn.execute("select * from users where name='"&name&"'") 'user is table
if rs.eof=true then
response.write("The require user"&name&"is not available in data base")
else
response.write("<b>"&rs("address")&"</b>")'pick the address from data base
end if
'So this is the little code to find the record it u have any difficulty is asp u can mail me on :[email protected]
Find the record in data base by name Comments
No comments yet — be the first to post one!
Post a Comment