I am new to Slim as well as PHP. I have been trying to send a form for a while with no luck.
My mail.php code is in same folder as the contact form.
my form is having action=“mail.php” and method=“post”>.
I also tried write route for mail.php
$app->post(’/mail’, function ($request, $response) {
return $this->renderer->render($response, ‘mail.php’);
});
and updated action = “/home/mail” but same problem.