I'm trying to copy a database data to another database. I'm trying to use the below procedure which is not working. I'm new to MySQL and PHP
<?php
require_once('conf.php');
?>
<?php
$q=mysql_query("SELECT * FROM navroop_mlm.".memberlogtbl." WHERE totalleft >='7' AND totalright >='7'");
while($r=mysql_fetch_array($q)){
$id=$r['id'];
$qlnk=mysql_pconnect("localhost", "navroop_mlm", "guwahati0011*");
mysql_select_db("navroop_aip", $qlnk);
mysql_query("INSERT INTO member_login (id, name, username, password,sex) VALUSE ('$id', '".$r['name']."', '".$r['username']."', '".$r['password']."', '".$r['sex']."')");
}
Please help me. Here username , Password and server is same of both database.