Some part of js function : nothig sent to database, and i've tested t1, t2 & t3 by alert, they're not empty, Any solutions, thanks.
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+ "&t2=" + t2 + "&t3=" + t3 ;
alert( 'success' );
}
//b1.php
<?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')");
?>
//connection.php
<?php
mysql_connect('localhost','root','');
mysql_select_db("banner");
?>
note : i use wampserver for testing
$_GEToutput for you?window.location = "www.yourwebsite.com/b1.php?t1=" + t1+ "&t2=" + t2 + "&t3=" + t3 ;GETmethod to pass data to your php page so you can properly see if the values are passed in the URL??? So are they passed or not??http://also at the begining of the url or it will be considered a directory under your current domain link..!