I have a page where i'm using edit-in-place... now, after the update it's showing slashes even though I am using stripslashes() - prob because ajax call just updating the div therefore bypassing the stripslashes function
Anyway, if i refresh the page manually they go away, which is what I need... so, i figure if i add a page refresh after the mysql update then all should be good - but i seem to be getting caught in endless loop
this is the php which is called within the jquery edit-in-place function:
$update = $_POST['update_value'];
$div_id = $_POST['element_id'];
include '/dbconnect.inc';
$changedata = mysql_query("
update page_content set
div_content_old = div_content,
div_content = '$update'
where div_id = '$div_id'",$db);
//echo $_POST['update_value']; commented out as before header()
header("Location: $PHP_SELF"); // using php_self as called from various pages
is there a better way to do this?
Closing question as it seems there's actually a bug in the js code which was forcing me to try this.
What i did in the end was simply stripslashes() before the result of the function was actually echoed - thanks for looking guys!