Good Day Experts,,can anyone help me,,i have a codes for inserting,selecting and deleting row data from original table into archieve table:
this is the original table
Username password fullname year course breakzzz breakzzzz romel first year prog.
and this is my archieve table:
username password fullnae year course
my plan is to insert the records from original table into archieve table..then this is my codes but it doesn't work
<?php
include('config2.php');
$query = mysql_query("DELETE FROM original_table WHERE id = '$id'");
$result=mysql_query("INSERT INTO archieve (username, password, fullname, course, year) SELECT * username, password, fullname, course, year FROM original_table WHERE id='$id'")
or die (mysql_error());
while ($row = mysql_fetch_array($result))
{
echo '<td><center><a href="write_message.php?id=1">' . $row['fullname'] . '</a></center></td>';
echo '<td><center>' . $row['username'] . '</center></td>';
echo '<td><center>' . $row['password'] . '</center></td>';
echo '<td><center>' . $row['fullname'] . '</center></td>';
echo '<td><center>' . $row['course'] . '</center></td>';
echo '<td><center>' . $row['year'] . '</center></td>';
}
?>
hope someone help me out thanks in advance..