Dear all,
I m doin 3 process page.
1- admin_ctrlpanel.asp( this is whr they input all field)
2- admin_settingview.asp( this is only let them view whether the field they enter correct or not)
3- ctrlpanel_process.asp ( this is only process when they r satisfy with wht they already keyed, and here only will store every field into mydatabase)
-------------------------------------------------------------------
admin_settingview.asp
-------------------------------------------------------------------
<form action="ctrlpanel_process.asp" method="post">
<table width="80%" border="0" align="center">
<tr class="header">
<td colspan="2"><B class="font02"><< Adminstrative Options >></B></td>
</tr>
<tr class="header">
<td colspan="2"><< Application Options >></td>
</tr>
<tr class="naming2">
<td width="28%">Add a New Category</td>
<td>
<%response.write(request.form("txtNewCat"))%>
</td>
</tr>
<tr class="naming2">
<td>Delete Category</td>
<td>
<%response.write(request.form("select1"))%>
</td>
</tr>
<tr class="naming2">
<td>Blocked Words</td>
<td>
<%response.write(request.form("select4"))%>
</td>
</tr>
</table>
<p> </p>
<table width="70%" border="0" align="center">
<tr class="header">
<td colspan="2"><< Security Options >></td>
</tr>
<tr class="naming2">
<td width="40%">Admin ID</td>
<td width="60%">
<%response.write(request.form("txtAdminNewID"))% >
</td>
</tr>
<tr class="naming2">
<td>Admin Password</td>
<td>
<%response.write(request.form("txtAdminPwd"))%>
</td>
</tr>
<tr class="naming2">
<td>Confirm Admin New Password</td>
<td><%response.write(request.form("txtConfirmPwd") )%></td>
</tr>
<tr class="naming2">
<td>Admin Nickname</td>
<td>
<%response.write(request.form("txtAdminNick"))%>
</td>
</tr>
<tr class="naming2">
<td>Nickname Password</td>
<td>
<%response.write(request.form("txtNickPwd"))%>
</td>
</tr>
</table>
<p> </p>
<table width="40%" border="0" align="center">
<tr>
<td><div align="center">
<input type="submit" name="Submit" value="Submit">
</div></td>
<td><div align="center">
<input type="reset" name="Submit2" value="Reset">
</div></td>
</tr>
</table>
<p> </p>
</form>
--------------------------------------------------------------------------
ctrlpanel_process.asp
--------------------------------------------------------
<%
dim sql
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:\Host\forum\complete\chatbox.mdb"
sql="INSERT INTO tbCategory (CategoryName)"
sql=sql & "VALUES"
sql=sql & "('"& Request.Form("txtNewCat") & "')"
on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("Sorry !<br> No update permission<br>" & err.description)
else
Response.Write("<h3>" & recaffected & " record added</h3>")
end if
conn.close
%>
----------------------------------
May I know tht is there any way to update into the db? Actually both page can run. But only when i check the database file--chatbox.mdb, there's nothing store even the 1 record added msg prompt out after the settingview.asp ...
PLz help.thanks!