Jump to content

problem with \\r\\n in mysqli!


mekha

Recommended Posts

Hi guys , i have a problem with mysqli: i am using a ckeditor....and my database is mysqli using!....now.. in every time i update the row..the ckeditor adding:\\r\\n..for example:upd1:\\r\\nupd2:\\r\\n\\r\\nupd3:\\r\\n\\r\\n\\r\\n ex...... i am using:

[/size][/font]$mysqli->real_escape_string($row["content_in_ckeditor"]);

.. and without clean results :S

Link to comment
Share on other sites

It is not issue with mysqli_real_escape_string(). showing us the code which is responsible for update would be helpfull.

Link to comment
Share on other sites

every time i update the row..the ckeditor adding:
I said showing that code you are using to updates the rows, would be helpfull.
Link to comment
Share on other sites

ok, this is: my query run:

$sqlm = getPageById();									    if ($resultm = $mysqli->prepare($sqlm))									    {											    $mypageid = 216;											    $resultm -> bind_param("i",$mypageid);											    $resultm->execute();   											    $resultm->store_result();											    $rowsm = $resultm->num_rows;									    }									    if($rowsm > 0)									    {											    $rowm = fetch($resultm);											    $pagetitle = $mysqli->real_escape_string($rowm[0]["page_title"]);											    $pageContent = $rowm[0]["page_content"];											    $pageurlname = $mysqli->real_escape_string($rowm[0]["page_name_url"]);											   									    }

the query:

function getPageById()	    {			    $sqlStr = "select * from tbl_pages where page_id = ?";			    return $sqlStr;	    }

this is my $_POST:

$mysqli->real_escape_string ($_POST["page_content"]);

this is my "echo":

$pageContent = $rowm[0]["page_content"];

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...