ok so i am using jquery ajax to send post data to the php page to get processed. since im using a textarea with an editor on it i have to call the content like so

var content = $('#pagecontent').val();

then post it through to the php page. which works but it seems to have a problem with a an & symbol in the post data. it cuts off the rest of the code after an & symbol.

when get the contents of the textarea with
console.log($("#pagecontent").val())

it grabs all the content. Even the content after the & symbol. then i post it through and have php output the contents that is submitted and then i see that the rest of the content after the & is gone.

So the problem that i am having is why is the ajax posting cutting off my content after an & symbol. it seems to grab the content fine before the submitting.

php interprets the "&" symbol as a URL parameter separator. Try substituting the & symbol with its hexadecimal value "%26", without parenthesis, before posting to php.

I think the issue was that i was using the ajax instead of post for jquery. Also i used a totally different editor as the one i was using sucked in support

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.