Welcome Guest, Not a member yet? Register   Sign In
Form action not working
#3

(This post was last modified: 05-29-2021, 01:11 PM by Secux.)

I tried with User/add and it still doesn't work

maybe I should put some kind of helper?
pressing the button does not execute the form at all

subSECURE is = secure.domain.com
in routers.php

PHP Code:
function whichSubRoute()
{
 
$subs = array("secure" => "secure/","api" => "api/");
 
$curr $_SERVER['HTTP_HOST'];
 
$curr explode('.'$curr);
 if (
array_key_exists($curr[0], $subs)) {
 return array(
$curr[0], $subs[$curr[0]]);
 }
 return 
false;
}
$choiceRoute whichSubRoute();
if (
$choiceRoute !== false) {
 if (
$choiceRoute[0] == "secure") {
 ...
$routes->match(['get''post'], 'User''User::index',['filter' => 'auth']);
 
$routes->post('User/add''User::add',['filter' => 'auth']);

 }
 if (
$choiceRoute[0] == "api") {
 }
} else {

$routes->get('/''Home::index');


Reply


Messages In This Thread
Form action not working - by Secux - 05-29-2021, 11:50 AM
RE: Form action not working - by includebeer - 05-29-2021, 12:30 PM
RE: Form action not working - by Secux - 05-29-2021, 01:00 PM
RE: Form action not working - by includebeer - 05-29-2021, 01:19 PM
RE: Form action not working - by Secux - 05-29-2021, 01:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB