Refresh page after update looping.. div better?
<p>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</p>

<p>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</p>

<p>this is the php which is called within the jquery edit-in-place function:</p>

<pre><code>$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
</code></pre>

<p>is there a better way to do this?</p>
