Hi, when I’m trying to give a function or action to a button, it doesn’t work as I thought. I’ve tried some ways but still didn’t work. Code of each trial I tried attached below.
Can anyone help me, please? Thanks in advance.
Here’s a snippet of my code:
Trial 1:
> <form method = "POST"> > ... /* Form's body goes here */ > <input type = "submit" name = "submit" value = "submit"> > </form>
And here’s the button test (in this case I used refresh page) but it results in error 405:
if (isset($_POST['submit'])){ echo "<meta http-equiv='refresh' content='0'>"; }
And also, here’s my route.php
return [
‘routes’ => [
[‘name’ => ‘page#index’, ‘url’ => ‘/’, ‘verb’ => ‘GET’]
]
];
Trial 2:
<form action = "another.php" method = "POST">
This resulted in load the leftmost app in nextcloud (not the app)
Thanks in advance.