Wierd thing is happening when I send data to my database. Anything after the ampersand is dropped as if it were never typed and everything before it is left intact. Can someone please tell me what I should use to preserve this character? REGEX? PHP function?
Thanks
EDIT:
code:
// The POST var contains data entered by the user so could be anything really. This is coming from a WYSIWYG editor.
$string = addslashes($_POST['txtarea']);
mysql_query("INSERT INTO...'$string'");
WYSIWYG.updateTextArea(n);
var form = WYSIWYG_Core.findParentNode("FORM", this.getEditor(n));
if(form == null) {
alert("Can not submit the content, because no form element found.");
return;
}
form.submit();
I want to echo the string out of what is being submitted. Can someone tell me what I need to place into this case to do that please? Is it alert(n)?
OK guys.. I got it to echo. I'm using an AJAX interface for this and just echo'd the values from there. WHen I add an ampersand in the the string, I get:
test&&
So.... it's not the editor..