im posting html to my upload.php file and im escaping is in jquery but it stores in the database as
%3Cdiv%20class%3D%22loungeTabsContainer%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20id%3D%22tab1%22%20class%3D%22tab_content%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cul%20class%3D%22imageLibrary%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20
how can i store it to the database as normal html?? code blocks are as follows:
var id = $('body').attr('id');
var content = escape(NewText);
$.post("update.php", { id: id, content: content },
function(response) {
$("#response").html(response);
$("#response").slideDown('slow');
slideout();
$("#loading").fadeOut('slow');
});
location.reload();
upload.php
$id = mysql_escape_string($_POST['id']);
$text = mysql_escape_string($_POST['content']);
// Connects to your Database
mysql_connect("localhost", "#########", "###############") or die(mysql_error());
mysql_select_db("##########") or die(mysql_error());
mysql_query("UPDATE content SET content='".$text."' WHERE id='".$id."'") or die(mysql_error());
It looks like the content you are sending is url encoded. You can use urldecode to decode the text back.