title: Getting date with JavaScript, then putting it into PHP database - putting actual script not variable
body: <p>When I am getting the date from the Javascript, it works fine when I echo it out in PHP, but when I try and insert it into the database, it gives me what is actually between the quotes. How can I fix this?</p>
  
  <p>What it prints out on the page:
  <a href="https://i.stack.imgur.com/EZyn5.png" rel="nofollow noreferrer">see here</a></p>
  
  <p>What it puts in the database:
  <a href="https://i.stack.imgur.com/jnpgJ.png" rel="nofollow noreferrer">see here</a></p>
  
  <p>My javascript/php:</p>
  
  <pre><code>$business_date = "&lt;script&gt;var today = new Date(); var date = today.getDate()+'/'+(today.getMonth()+1)+'/'+today.getFullYear(); document.write(date)&lt;/script&gt;";
  </code></pre>
  
  <p>Thanks,</p>