I have the following php code on a separate page named serverqrys.php
mysql_connect("localhost", "root", "") or die(mysql_error());
echo "Connected to MySQL<br />";
mysql_select_db("buildingpoint") or die(mysql_error());
echo "Connected to Database";

And a java script function that displays a form again on button click

function showform(controlId)
var mycontrol=document.getElementById(controlId);

and my html page with the form looks something like this:
<a href="#" onclick="showform('postjob');">POST A JOB</a>
<form id="postjob" name="postjob" action="serverqrys.php" method="post" style="display:none;">
<td><input name="loged_name" type="text"/></td>
// other form controls bla bla.................

<tr><td colspan="2" align="center"><input name="post_job" type="button" value="SUBMIT" /></td>

when I click the submit button the php page is not shown but when I test the php page alone without calling it from the html page it works fine. Where am I going wrong?