title: how to use document.getElementbyId in PHP
body: <p>i want to run javascript in PHP but this code isn't not working at all for me.</p>
  
  <pre><code>if(!mysqli_fetch_assoc($result))
      {
        echo '&lt;script type="text/javascript"&gt;',
       'document.getElementById("console1").innerHTML += "Query did not work";',
       '&lt;/script&gt;'  ;
  
      }
  </code></pre>