Gazing into my crystal ball I observed navin <navin.narayana@gmail.com>
writing in news:1191696305.305459.180630@o3g2000hsb.googlegroups.com:
[quoted text, click to view] > Hi All,
>
> i have page which shows supplier information in a table format.
>
>
> Supplier Name Contact Email
> AAA xxxxx xxxxxxx
>
>
> In order to change or update information for the supplier, i want to
> display supplier name in the table cell as a link.
<td><a href="update.asp?supplier=<%=id%>" title="Update this record">AAA
</a></td>
[quoted text, click to view] >
>
> so if user clicks on the link with the supplier name, it should take
> the user to another page (suplier update page) where it should
> display
> the supplier information in text boxes. if users wants they can then
> change information and update it into database.
>
sql = "SELECT fields FROM table WHERE id = " & request.querystring("id")
'open up recordset, assign values, eg: name = rs("name")
if request.servervariables("REQUEST_METHOD") = "POST" then
if request.form("name") <> "" then
update = "UPDATE table SET field = '" & request.form("name")
& "' WHERE id = " & request.form("id")
'execute statement
'maybe take the user back to the original page
else
'give the user some sort of message
end if
end if
%>
<form method="post" action="<%=request.servervariables
("SCRIPT_NAME")%>">
<fieldset><legend>Update Information</legend>
<label for="name">Name: </label> <input type="text" name="name"
id="name" value="<%=name%>">
<p><input type="hidden" name="id" value="<%=request.querystring
("id")%>">
<input type="submit" value="Update Record"></p>
</fieldset>
</form>
[quoted text, click to view] >
> Could anyone please tell me how to do the abve.
>
See above... you can do a lot more, create functions, etc.
[quoted text, click to view] >
> If anybody has any other idea to update the information in database,
> please share.
>
>
> Appreciate any ideas on this.
HTH
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info Please respond to the group so others can share