title: Javascript- passing variables to php page with window.location.href not working
body: <p>Some part of js function :
  nothig sent to database, and i've tested t1, t2 &amp; t3 by alert, they're not empty, Any solutions, thanks.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>else{
      var t1 = document.getElementById('t1').value;
      var t2 = document.getElementById('t2').value;
      var t3 = document.getElementById('t3').value;
      window.location.href = "b1.php?t1=" + t1+ "&amp;t2=" + t2 + "&amp;t3=" + t3 ;
      alert( 'success' ); 
    }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>//b1.php
  
  &lt;?php
    
          $email=$_GET["t1"];
      
   $img=$_GET["t2"];
   
          $target=$_GET["t3"];
   
          include("connection.php");
          $sql=mysql_query("insert into b1(email, img, target)
           values ('$email', '$img', '$target')");
     
     
  ?&gt;
  
  //connection.php
  
  &lt;?php
          mysql_connect('localhost','root','');
          mysql_select_db("banner");
  ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>note : i use wampserver for testing</p>