Hi boy you will see I have a code.
This piece of code requires another page where there are two functions
get_productos()
and eliminar($_GET['id_eliminar'])
get called and load the products on the home page.
Each record has a button to eliminate that by means of href it sends the id of the product to the page with this code. But the code gives me error in
require_once('modelo/ObtenerRegistro_Modelo.php');
The error is:
Warning: require_once (model / GetModel_Record.php): failed to open stream: No such file or directory in C: \ wamp64 \ www \ MVC \ driver \ UsoModel_Controller.php on
It is rare that the first time you pass by here to load and display the list does not give an error but the second time to call the function delete if it gives an error
I've tried the eliminar($_GET['id_eliminar'])
function in another archivo.php
with require_once('modelo/ObtenerRegistro_Modelo.php');
and it works, it does not give an error.
<?php
require_once('modelo/ObtenerRegistro_Modelo.php');
$productos = new ObtenerRegistro_Modelo();
$arrayProductos = $productos->get_productos();
if (isset($_GET['id_eliminar'])) {
$productos->eliminar($_GET['id_eliminar']);
}
?>