hide div from php file

0

I have a function that calls a php file, this file returns a value and based on this, in the ajax success, I hide a div or not. This is a security problem and I was wondering if from the php file I'm calling from the function, I could hide the div.

    
asked by Lorenzo Martín 26.09.2018 в 18:01
source

1 answer

0

If possible. From the file php you can execute a script in the following way:

<?php

    $script = "<script> $(#idDelElemento).hide();</script>";
    echo $script;

?>

Since you do not give a lot of data this is a somewhat generic solution, I hope it helps you.

    
answered by 26.09.2018 в 18:08