I am not writing my exact code here but I am giving the basic idea.
<form action="thispageagain.php">
for($i=0; $i<$n; $i++){
echo "<input type=\"submit\" value=\"view post\" />";
}
</form>
Now when someone click on view post i have to send post id for that post. How can I do this. I have to use post method here.
you need to send the post id right… if i did not get your question wrong then you can do it as follow.. i assume that $i represents your post id that you want to send.