change css if database gives certain value - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Tuesday, May 2, 2023

change css if database gives certain value

I'm currently trying to write a program that creates an invoice pdf. Now im looking for a way to set a div's style within the pdf to display: none, if the database gives out the country e.g. "germany". I'm not sure if there is a way to do that within PHP, as I know there is a way using document.getElementById with JS

Tried using document.getElementById, but I am not sure where exactly I have to put that statement.

if($data["country"] == "Germany"){
  document.getElementById("vat").style.display = "none";
} 


source https://stackoverflow.com/questions/76148760/change-css-if-database-gives-certain-value

No comments:

Post a Comment