I am trying to take data from one mysql table and insert it in to another so i can make some updates without using a live db table. The problem i am having is it is taking the data out of the first table but not inserting it in the second. Any help would be appreciated.
error_reporting(E_ALL);
ini_set("display_errors", 1);
$host="";
$username="";
$password="";
$database="";
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "SELECT * FROM livetrack where member_id ='000826'";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
$ipa = $row['ip_address'];
$date = $row['date'];
$referer = $row['referer'];
$string = $row['string'];
$member_id = $row['member_id'];
echo "Insert Data.....";
mysql_query("INSERT INTO livetrack11 (ip_address, date, referer, string, member_id)
VALUES ('$ipa', '$date', '$referer', '$string', '$member_id'");
}
Thanks