Content tools save to codeigniter
<p>Need help getting this to work with php. <a href="http://pastebin.com/xSqvq2nx" rel="nofollow">http://pastebin.com/xSqvq2nx</a></p>

<p>I followed the contenttools getting started and all works well (for the front end). However the ajax call seems not to be working.
F12 console on firefox shows error 500 (server error). so i have changed the save link to this below function. </p>

<pre><code>function editbox()//Edit box on page
{
        $data = var_dump($_POST);

        $fp = fopen("save_something.txt", "w");

        fwrite($fp, $data);

        fclose($fp);

    }
</code></pre>

<p>However all I get is an empty file. Need help figuring this out.</p>

<p>Reference : <a href="http://getcontenttools.com/getting-started" rel="nofollow">http://getcontenttools.com/getting-started</a></p>