Formattable Textbox for Entry into MySQL database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ifedi
    New Member
    • Jan 2008
    • 60

    Formattable Textbox for Entry into MySQL database

    Hi anyone,
    I'll put it straight..
    I need to use a textbox SUCH AS THIS ONE INTO WHICH I TYPE AS I WRITE, such that formatted text can be sent into a MYSQL text type field. On another page, I should be able to query out this database field into a different textbox, retaining any formatting initially applied in the first textbox..
    Thanks in advance.
    Ifedi.
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    Originally posted by ifedi
    such that formatted text can be sent into a MYSQL text type field. On another page
    This is not clear. MySQL is a database not a form field. So there is no field type of MySQL. Also since it sounds like you want to be able to do database access you will need a server side technology like ASP, JSP, PHP, etc. You can not access a database with JavaScript by it self.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Is the text box a WYSIWYG one or a simple one with [b], [u], [code], etc. tags?

      If it's a simple one, you can just take the text like a normal text area and insert into the database using server-side code. Do you want to do this without unloading the page?

      Comment

      • Ciary
        Recognized Expert New Member
        • Apr 2009
        • 247

        #4
        if you do, use an ajax request and POST (otherwise the url is going to be too long) the text. on the loaded page you execute an sqlquery in which you insert the text in your mysql. when you dont mind the page reloads, you can simply post the data and put it in your mysql on page load.

        Comment

        Working...