Re: inserting into database

  •  02-20-2007, 6:26 PM

    Re: inserting into database

    yes it does work the todatabase.asp

    but mt form does not insert in the database. do you know why?

    ALSO

    But most importantly my form was working fine before i implemented the Cute editor for asp but i wanted
    to use my existing connection to the database, recorset that i had before but just be able to have my text area the cute editor. is this possible.  Much like the Web Wiz Rich Text Editor (RTE)

    http://www.webwizguide.info/asp/sample_scripts/RTE_application.asp

    anyhow can you please show me how to do this with my code and just be able to have the description field use the cute editor, to use my existing forms recordset and database conection. coz in my other forms i will be using a seperate processor file with more fields needing seaved to the database so it will make things harder.

    this is my connection and recordset code before the <head> tag

                <%
                Dim rs_cinfo
                Dim rs_cinfo_numRows
               
                Set rs_cinfo = Server.CreateObject("ADODB.Recordset")
                rs_cinfo.ActiveConnection = MM_conn_mt_STRING
                rs_cinfo.Source = "SELECT * FROM Tbl_Cinfo_main ORDER BY cinfomainID DESC"
                rs_cinfo.CursorType = 0
                rs_cinfo.CursorLocation = 2
                rs_cinfo.LockType = 1
                rs_cinfo.Open()
               
                rs_cinfo_numRows = 0
                %>

    and this is my form

                                      <form name="frm_update_hp" id="frm_update_hp" method="POST" action="<%=MM_editAction%>">
                                            <span class="style3">About Us / Update</span> <br /><br />
                                            Title
                                            <input name="title_entry" type="text" id="title_entry" value="<%=(rs_cinfo.Fields.Item("title").Value)%>" size="60">
                                            <br /><br />
                                            About Mail Tech
                                           
                                     <textarea name="aboutus_entry" cols="100" rows="20" wrap="virtual" id="aboutus_entry"><%=(rs_cinfo.Fields.Item("description").Value)%></textarea>
                                                <br />
                                                <input name="author" type="hidden" id="author" value="<%= Session("MM_Username") %>" />
                                                <input type="submit" name="Submit" value="Submit" />
                                                <input type="hidden" name="MM_insert" value="frm_update_hp">
                                          </form>


    Filed under:
View Complete Thread