I created this answer to a question, it works perfectly, inserts into the database and everything. I only wanted one thing, when I pressed this button, it saved the database, but also went to another page where you have another question.
if ($_POST['post'] == '3'){
$db->query("INSERT INTO resp3 (id, tonemai)VALUE (NULL ,'to nem ai, morra!')");
}
html
<form action="" method="post">
<input name="post" type="hidden" value="3"/>
<input type="image" src="7.jpg" onclick="this.form.submit()" id="botao3">