Failed to call php in Submit a button

Asked

Viewed 24 times

0

I’m trying to run a php script on Submit from a button, but php is called I get an error on inlcude - "failed to open stream: No such file or directory in "I called php by a include off the button and it worked but when I try to put it on the button of that error.

html

<a href="#!" class="modal-close btn-flat">Cancelar</a>
<a href="Chamadas/remover.php"><button  class="btn cyan" type="submit">Excluir</button></a>

include in php that reproduce the error when I call only by button - file name remove.php

include_once("DAO/dalA.php");
include_once("Classes/classA.php");
  • Not a form, just the button

  • Reignomo, it’s kind of dangerous to just call the include pore just like you’re doing, because you have to take into account a few things like, from what location you’re calling these files. Put the for example include_once(DIR . "DAO/Dala.php");. for the includes you make.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.