title: How to pass php variable in window.location javascript
body: <p>I want to pass the php variable inside the window.location javascript this is my php code and i am unable to do that.</p>
  
  <pre><code>echo '&lt;script&gt;location.href = "reportConsumption.php?creategenReport="'.$genid.'"&amp;sDate="'.$startdate.'"&amp;eDate="'.$enddate;&lt;/script&gt;';
  </code></pre>