pass data and get data into php file from html to jquery to php and then from php to jquery to html
<p>OK i have this code</p>

<p>HTML:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"&gt;                      &lt;/script&gt;
&lt;script type="text/javascript"&gt;
function get() {

$.post('tt.php',
{ 
$('#name')
},
    function(output) {
        $('#age').html(output).show();
        });

}

&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;input type="text" id="name" name="name"/&gt;
&lt;a href="javascript:get()"&gt;haller&lt;/a&gt;
&lt;div id="age"&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>and then this php file.</p>

<p>PHP:</p>

<pre><code>&lt;?
$name=$_POST['name'];
if ($name=="juliver")
{
echo "haller";
}
elseif ($name==NULL)
{
echo "Please put a name!";
}
else
{
echo "wrong name";
}
?&gt;
</code></pre>

<p>the scenario is this, whatever value that the input has, it will be pass into the php file using the jquery of course as you can see, whenever the user clicks on the anchor tag which has the get() function and then the php file process the data (execute) and then pass it back to the jquery and then the jquery will output the data into the html. as of right now, i cant make this thing work. plesae help me. thanks in advance.</p>
