Custom Files - forms

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Posts: 17

Custom Files - forms

Post by luchidemus »

Hi, i have this code.

$editFormAction = htmlspecialchars($_SERVER['PHP_SELF']);
if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);

with a form with a post method that executes this: in the form "action": echo $editFormAction

and add these inputs:

  <input type="hidden" name="<?= $TokenNameKey ?>" value="<?=  $TokenName ?>"><!-- CSRF token name -->
  <input type="hidden" name="<?= $TokenValueKey ?>" value="<?=  $TokenValue ?>"><!-- CSRF token value -->

which appear null to me, but it does not make it clear to me that I have to follow another path.

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "proveedor")) { // y etc.. validations.

I get a 404 error when I send it to the route that ends up being in index.php. it is a custom file

Posts: 8746

Post by arbei »

Make sure you access the page by its route, not by its file name.

Post Reply