posting to the database

Last post 04-08-2008, 8:45 AM by Adam. 1 replies.
Sort Posts: Previous Next
  •  04-06-2008, 6:37 AM 38772

    posting to the database

    I am having problems getting the data from the cuteeditor textarea to post to the database.
     
    this insert record form is working for everything else, but the cuteeditor text.  if i put a value in the
       <input type="hidden" name="Editor1" id="Editor1" value="" /> line, i get written to the database whatever i put in the "" here.
     
    how do i tell it that the value of this input is whatever is typed into the cuteeditor?  I tried putting "Editor1", but it just wrote "Editor1" to the database.
     
    Thanks a million!
    M
     
    here is my <form> tag

    <form action="<?php echo $editFormAction; ?>" name="form1" method="POST" onsubmit="myOnSubmitEventHandler()">
          <table class="update" align="center" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <th height="31" scope="col"><div align="right"><strong>Sort: </strong></div></th>
              <th scope="col"><input name="sortHP" type="text" size="50"></th>
            </tr>
            <tr>
              <th height="31" scope="col"><div align="right"><strong>Title: </strong></div></th>
              <th scope="col"><input name="titleHP" type="text" size="50"></th>
            </tr>
            <tr>
              <td height="31" valign="top"><div align="right"><strong>Description:</strong></div></td>
              <td valign="top">
              <?php
             $editor=new CuteEditor();
             $editor->ID="Editor1";
             $editor->Text="";
             $editor->FilesPath="CuteEditor_Files";
             $editor->ConfigurationPath="/update/CuteEditor_Files/Configuration/AutoConfigure/kyTools.config";
             $editor->Width="75%";
             $editor->Draw();
            //$editor=null;

             //use $_POST["Editor1"]to catch the data ?>
    </td>
            </tr>
           
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><input type="submit" name="Submit" value="Insert Record"></td>
            </tr>
          </table>
       <input type="hidden" name="Editor1" id="Editor1" value="" />
      <input name="ID" type="hidden" value="">
       <input type="hidden" name="MM_insert" value="form1">
      
        </form>
          

  •  04-08-2008, 8:45 AM 38868 in reply to 38772

    Re: posting to the database

    You can retrieve the CuteEditor contents using the $_POST array. The name of the variable in the $_POST array will be CuteEditor ID. For example if your Cute Editor class ID is "Editor1", the variable would be $_POST["Editor1"].
     
    After you get this data, you can write it into any data source.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML