the invalid argument supplied for indexphp and foreach shows nothing

You need to add ?accio=val to your URL.

In your index file, look at the if/else block. It’s checking what’s in $_GET and if accio is not set, it won’t show your page. I don’t know what that parameter is for and it doesn’t appear to be used elsewhere in your code.

<?php
    if(!isset($_GET['accio'])){
        error_log("error");
    }else{
        $accio = $_GET['accio'];
        switch ($accio)
        {
            default:
                include __DIR__.'/controllers/control_categorias.php';
                break;
        }
    }
?>

Since $accio doesn’t appear to be used, you can probably use this as your index.

<?php
    include __DIR__.'/controllers/control_categorias.php';
?>

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top