thanks a lot guys,and also thanks to my supervisor to show me the solution.now it works......here i'll share with u the way.
first create a new file for insert to database function.let say we name it insert.php.the code suppose to be like this(example for my system but not yet finish since i just test for 1 variable first).
<?
$payee = $_POST[payee];
$db = mysql_connect ("localhost", "", "");
mysql_select_db("tresco", $db);
$sql = "INSERT INTO petty_cash (payee, payment_of, pv, petty_month, petty_day, petty_year, cheque, doc, inv, amount, total_amount) VALUES ('$payee', '$payment_of', '$pv', '$petty_month', '$petty_day', '$petty_year', '$cheque', '$doc', '$inv', '$amount', '$total_amount')";
$dbResult = mysql_query ($sql, $db);
?>
then in the interface or form file,for this line
<form id="form2" name="form2" method="post" action="insert.php">
file insert.php (bold) is the file that we have created earlier.
that its,it should work now.
i'll glad to hear any comment and idea from you guys.TQ