posting to the database

  •  04-06-2008, 6:37 AM

    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>
          

View Complete Thread