Howdy!
I am very new to ASP but have been playing with PHP. I have a form that I wish to use to update one record in the database over and over again. My database is called tblContent in it are fields id and content. The form looks like this:
<form method="post" action="addtomarquee.asp">
<textarea rows="8" name="datainfo"</textarea></td>
<input type="submit" value="Submit!">>
<input type="hidden" name="secret" value="1">
</form>
-----------------
The SQL page looks like this:
<%@Language=VBScript%>
<% Option Explicit %>
<%
Dim conn
Dim SQL
set conn=Server.CreateObject("ADODB.Connection"
conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("essex.mdb"
conn.open
SQL = "Update tblContent SET content WHERE id = '"&Request.Form("secret"
&"' AND content = '"&Request.Form("datainfo"
&"'"
conn.Execute SQL
conn.Close
Set conn = Nothing
%>
What am I doing wrong??
I am very new to ASP but have been playing with PHP. I have a form that I wish to use to update one record in the database over and over again. My database is called tblContent in it are fields id and content. The form looks like this:
<form method="post" action="addtomarquee.asp">
<textarea rows="8" name="datainfo"</textarea></td>
<input type="submit" value="Submit!">>
<input type="hidden" name="secret" value="1">
</form>
-----------------
The SQL page looks like this:
<%@Language=VBScript%>
<% Option Explicit %>
<%
Dim conn
Dim SQL
set conn=Server.CreateObject("ADODB.Connection"
conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("essex.mdb"
conn.open
SQL = "Update tblContent SET content WHERE id = '"&Request.Form("secret"
conn.Execute SQL
conn.Close
Set conn = Nothing
%>
What am I doing wrong??