ý have problem while moving two sections from one table to other:
ý have a table that name user_a. ýt has two sections ; username and pass. ý wan to copy all information in username and pass in to other table that name user_b. user_b haz two sections; user and password. how can ý copy information from one to other. I wrote a script but ýt only copy one not all.
script:
<? require ("conf.php");
$connection;
$sql = "SELECT username, password FROM user_a ";
$result = mysql_query($sql);
while (list($username, $password ) = mysql_fetch_row ($result))
$u="$username";
$p="$password;
// Register user
$sql = "INSERT INTO user_b (name, password) VALUES ('$u', '$p')";
$result = @($sql) or die ("Can not register user");
// close connection
?>
?>
what is problem, can ý solve problem whit using php myadmin