Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-11-2011, 08:37 PM   PM User | #1
richard300
New to the CF scene

 
Join Date: Dec 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
richard300 is an unknown quantity at this point
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
richard300 is offline   Reply With Quote
Old 12-12-2011, 03:02 PM   PM User | #2
Arnaud
Regular Coder

 
Join Date: Jan 2008
Location: Geneva, Switzerland
Posts: 413
Thanks: 12
Thanked 29 Times in 29 Posts
Arnaud is on a distinguished road
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.
Arnaud is offline   Reply With Quote
Reply

Bookmarks

Tags
ajax, form, mysql

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:56 PM.


Advertisement
Log in to turn off these ads.