I have to change the image of the background that I assigned by css to a body depending on the validation that I do with an if in php, it would be something like this:
if(!empty($userData)){
echo "<script language='javascript'>";
echo "document.body.style.backgroundImage='none'";
//echo "$('.cuerpo').css('background-image', 'none');";
echo "</script>";
}else{
echo "no se cambia el background";
}
I can not find how to do it, the idea is that the php validates a valid and if this is true do several things among others take the background to a body.