When I was learning Php with Mysql, I got a problem :
<form action="?" method="POST">
.
.
.
</form>
Why do we put "?" in the action
attribute?
PS: this form was for inserting text into a database.
Actually, I have an Index.php
file which is the controller, and 2 files (form.html.php
and joke.html.php
as templates). In the tutorial, I first clicked on a link "add joke" to include the form.html.php
file and in this form there is <form action="?"> </form>
and a submit <input>
. When I click on submit, the controller index tests and executes the inserted SQL query.
Thanks.