Problem with the $ _GET [""]

0

I have a problem with the GET and I can not find why it does not work.

First of all, I have to save what is in the get in a variable:

$error = $_GET["error"];

After I show the error depending on the number of the get:

<?php

                    if ($error != "") {
                        ?>

                        <div class="alert alert-danger display-hide">
                            <button class="close" data-close="alert"></button>
                            <span> 

                            <?php

                            if ($error === "001") { 
                                echo $CRError001;
                            } elseif ($error === "002") {
                                echo $CRError002;
                            }

                            ?>

                            </span>
                        </div>

                        <?php
                    }

                ?>

Still, it does not print the error message and I do not know what may be happening.

    
asked by Charlie Clewer 23.05.2017 в 19:42
source

1 answer

0

The error message does not appear because the div is applying a class that hides it display-hide .

If you remove it, the error message should appear.

<div class="alert alert-danger">
    <button class="close" data-close="alert"></button>
    <span> 

    <?php

    if ($error === "001") { 
        echo $CRError001;
    } elseif ($error === "002") {
        echo $CRError002;
    }

    ?>

    </span>
</div>
    
answered by 24.05.2017 / 17:00
source