That could work. What functions are you using on your text variable before the insert query?
I'm not keen on storing text with html (<br />) included. \n or its variants seems a much more flexible way to store a newline. You can decide how you need your output replaced (nl2br()) or something else or as is (\n).
The question may be: Are you storing \n as a literal '\n' instead of a "proper" newline - I think this is what Pritaeas is getting at. So show your INSERT query (along with the php code). When you view the text directly in the table using phpMyAdmin or other GUI, I don't think you should actually see the \n in the table cell.
var dataString = 'update_text='+ updateval+'&uploads='+X+'&update_text_descr='+update_text_descr+'&text_sample='+text_sample+'&country_id='+country_id+'&c_id='+c_id;
the html <textarea name="text_sample" cols="45" rows="15" id="text_sample"></textarea>
i think that the syntax is wrong because after the '\r' needs the value that it will replace it with
this is what its stored in the row
Life in a German Crack Regiment\n\nAuthor: Wolf Ernst Hugo Emil Baudissin\n\nRelease Date: September 2, 2014 [EBook #46755]\n\nLanguage: English
If you actually see the \n in the phpmyadmin window, it sounds as though you've used addslashes or escaped the \ character in some way. I'm assuming therefore that "\n" is what you need to replace, as suggested by Borzoi.
Hi, I am a newbie in developing a website. i have tried to connect using mysqli conncetion
Here is my simple code.
// db.php code
//$con = mysqli_connect("localhost","root","","bakery"); ...