search record in database to update - asp
Hi,
I need help with searching for a value in the database (i.e. email address) so the user can update or delete their records.
I have no trouble updating. I usually list the data and then click on the one that needs updating.
I'm having trouble retrieving the information after the user has typed in their email address.
Here is my code so far - at the moment I have listed the data in a table with an "update" link next to each row that allows me to update.
Where would I put the text field where the user can type in their email? I've tried different ways but was unsuccessful.
<input name="email" type="text" id="email" size="50">
Hope you can help
Thanks
<%
.
.
.
.
strSQL = "SELECT * FROM emails"
rsEmail.Open strSQL, conn
%>
<html>
<head><title>All</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="layout.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrapper">
<p> </p>
<div id="view">
<div class="insert"><a href="insertform.html">Insert</a></div>
</div>
<table width="1100" cellpadding="5">
<tr>
<td width="53">ID</td>
<td width="300">firstname</td>
<td width="378">lastname</td>
<td width="121">email</td>
<td width="92">Update</td>
<td width="92">Delete</td>
</tr>
</table>
<table width="1100" cellpadding="5">
<%
Do While not rsEmail.EOF
%>
<tr><td width="53"><% Response.Write rsEmail("id") %></td>
<td width="294"><% Response.Write rsEmail("firstname") %></td>
<td width="374"><% Response.Write rsEmail("lastname") %></td>
<td width="119"><% Response.Write rsEmail("email") %></td>
<td width="91"><% Response.Write ("<a href=""update_form.asp?ID=" & rsEmail("ID") & """>")%>Update<%Response.Write ("</a>") %></td>
</tr>
<%
rsEmail.MoveNext
Loop
'Reset server objects
rsEmail.Close
Set rsEmail = Nothing
Set conn = Nothing
%>
</table>
</div>
</body>
</html>
(i rephrased my question earlier but the views were the same so I thought I should re-post my new quesion as I am really struggling! ) hope someone can help!
Thank you
