Hi,
On one of my forms I need a button that when clicked on would update a field in a table. Is this possible?
Thanks in advance
Steve
Yes. Absolutely.
<form name="form1" action="updatedb.asp" method="post">
<input type="text" value="1" name="id">
<input type="submit" name="submit" value="Submit">
</form>
So when the user submits the form above, you are redirected to updatedb.asp. Whatever is in the form will be passed to updatedb.asp. In this example above, the "1" for "id" gets passed to updatedb.asp. From that page, you can grab the id value as follows:
<%
Dim id
id = request.form("id")
'---insert database code that will update a record with id that is passed in...
%>
There are many variations as how to accomplish this. But this is a start.
Hope this helps
Was this answer helpful ?
Yes No