Make a DIV appear from php

2

How can I do so that from a php modify a value of css

I have a simple user access form, but I want that when checking that this user is registered, a div that was previously hidden in which will have different links and options appears.

Next I show what has occurred to me. Since I only knew how to do this with JS I tried to do it that way. How would it be done?

if ($filas>0) {
    header("location: index.html");

    <script type="text/javascript">
        $('#sub-header').fadeOut();
    </script>

}else{
    header("location: index.html");
}

How to make modifications from php . Since JS I have no problem, but I can not think of how to do it from here.

Cheers!

    
asked by NEA 25.06.2018 в 20:50
source

1 answer

0

You can do it with js, from php you use a echo and you're done, something like this:

if ($filas>0) {
header("location: index.html");

echo '<script type="text/javascript">
    $("#sub-header").fadeOut();
</script>';

}else{
header("location: index.html");
}
    
answered by 25.06.2018 в 21:26