Ok
I have a textarea field that is validated by Js, this textarea can and will contain the newline character
[CODE]n
so I validate in JS
[CODE]if(textareaname.value.length < 200)
this hten goes through to my php where i also check before I place in to the Database using MYSQL
[CODE]if( strlen($_POST[‘textareaname’]) < 200 )
but my php is giving me a different string length from my javascript.
It looks as if Javascript is counting a newline as 1 character and php is treating it as 2.
I have checked my slashes, I have used various REgex to check these data amounts. I have also Googled around and there doesnt seem much around.
Any ideas? Any suggestions as to how I can make php and javascript treat a newline as the same amount of characters?
Thanks in advance.