Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Send and store a long string with exeptions

    I have a form with a text box with the following text, but about 30 times longer:

    [[1,'A','aaa'],[0,'B','abc'],[0,'C','bbb']]


    Now, I want to send & store this information in a text field in my mysql database using ajax.

    What is the best method to send it with ajax and how should I encode and decode it when inserting and opening the data.

    Thanks

  • #2
    Regular Coder
    Join Date
    Jan 2008
    Location
    Geneva, Switzerland
    Posts
    413
    Thanks
    12
    Thanked 29 Times in 29 Posts
    Well, you have this information in a single text box and you want to save it as a single text entry in your db, right?

    I don't see where there would be any issue. Just get the contents and send them through ajax, and have it inserted in your db.

    Regarding your question about encoding when inserting, what exactly are you looking for?
    http://php.net/manual/fr/function.my...ape-string.php should be enough (?).
    Chuck Norris counted to infinity.
    Twice.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •