Ok, so I want to submit a form with javascript. But the thing is, i want to use the post method. So that the information is hidden to the user.
Code:
<?
print($_POST['sammy']);
?>
<form name="myform" action="test1.php" method="POST">
<input type="hidden" name="sammy" value="sammy">
<a href="#" onclick="javascript:myform.submit()">CLICK HERE</a>
</form>
<script type="text/javascript" language="javascript">
<!--
function sub(){
document.myform.submit();
}
//-->
</script>
when i click the link, it shows this url on the browser :
/test1.php?sammy=sammy