Dear Califdon and Zoxive,
This the coding that i have and it's wrking.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<?
include("connect.php");
$aa=$_POST['aa'];
$bb=$_POST['bb'];
$sql_file = "INSERT INTO ww (aa,bb) VALUES('".$aa."','".$bb."')";
$reg_result = mysql_query($sql_file) or die("error".mysql_error());
?>
<body>
<form name="MyForm" method="POST" action="">
<input name="aa" type="text" id="aa" />
<input name="bb" type="text" id="bb" />
</form>
<?
echo '<div id="sub_menu_div" >';
echo "<ul id=\"cssdropdown\">";
echo "<li class=\"mainitems\"><a href=\"javascript:document.MyForm.submit();\"><img src=\"images/mail_one.gif\"> Save</a></li>";
echo "</ul>";
echo "</div>";
?>
<!--<a href="javascript:document.MyForm.submit();">
Click to submit the form
</a>-->
</body>
</html>
my problem is,when i press Refresh and when i load the page it's adding empty record or previous record to the database.