Hello all, I'm fairly new at this so please excuse my code. I've been trying to find a way to populate the text field from a recordset and I cannot get this to work. I've searched all over the internet and forums and I've only found ways to do this using PHP. I need it to work using ASP. What I need it to do is to show an editor for each field with the initial value of the data in the database. I want to be able to edit this data in the editor and after submitting the form update this data. I'm using ASP and this is the code I have. Please help.
.....
cid=Request.Form("pageid")
if Request.form("webcontent_title")="" then
set rs=Server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM webcontent WHERE webcontent_id=" & cid,conn
%>
<form method="post" action="update.asp">
<table>
<%for each x in rs.Fields%>
<tr>
<td><%=x.name%></td>
<td>
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "/FCKeditor/"
oFCKeditor.Value = x.value
oFCKeditor.Create "x.value"%>
</td>
<%next%>
</tr>
</table>
<br /><br />
<input type="submit" value="Update record">
</form>
<%
else
......
.....
cid=Request.Form("pageid")
if Request.form("webcontent_title")="" then
set rs=Server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM webcontent WHERE webcontent_id=" & cid,conn
%>
<form method="post" action="update.asp">
<table>
<%for each x in rs.Fields%>
<tr>
<td><%=x.name%></td>
<td>
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "/FCKeditor/"
oFCKeditor.Value = x.value
oFCKeditor.Create "x.value"%>
</td>
<%next%>
</tr>
</table>
<br /><br />
<input type="submit" value="Update record">
</form>
<%
else
......