jquery.ajax with php
<p>I have just started working on php. It's a very good lang as I'm feeling but some point I get stuck as I'm new to this.</p>

<p>My javascript code</p>

<pre><code>var pv = $("#txtStart").val();
var av = $("#txtStartNextLevel").val();
var au = $("#fileStartPlay").val();
alert(pv+" "+av+" "+au);
var myau = au.split('\\');
$.ajax({
    type:"POST",
    url:php_url,
    data:"{startPoint:"+pv+"nextLevelPoint:"+av+"audioFile:"+myau[myau.length-1]+"}",
    contentType:"application/json",
    dataType:"json",
    success:function(){
        alert("done");
    },
    error:function(){
        alert(response);
    }
});
</code></pre>

<p>My PHP code.</p>

<pre><code>&lt;?php
    if(file_exists("Text.txt"))
    {
        $fileName = "Text.txt";
        $fh = fopen($fileName,"a")

        $Starts = $_POST["startPoint"];
        $NextLevel = $_POST["nextLevelPoint"];
        $AudioFileName = $_POST["audioFile"];
            $code .=$Starts."*".$NextLevel."_1*".$AudioFileName."\"";
            fwrite($fh,$code);
        fclose($fh);   
    }
?&gt;
</code></pre>

<p>When I run this it executes but doesn't write the values in the variable </p>

<pre><code>$Starts,$NextLevel,$AudioFileName**.
</code></pre>

<p>And further if I write the same ajax procedure in    </p>

<pre><code>$.post(php_url,{startPoint:pv,nextLevelPoint:av,audioFile:myau[myau.length-1]},function(data){});
</code></pre>

<p>this works fine and write the content in the file.   </p>

<p>Also As I'm using post method it should not display the values in Address bar what I'm passing to write. But it's showing those values in both the method.    </p>

<pre><code>localhost://myphp.php?txtStart=Start&amp;fileStartPlay=aceduos.jpg&amp;txtStartNextLevel=adfd
</code></pre>

<p>Please guide me where I'm lacking...</p>
