# How to insert it to another table of database using the submit to approved?? #
my error is below in the submit to approved..anyhelp guys
Select is working but inserting to another table got error
<table border="1">
<?php
include("db.php");
$result=mysql_query("SELECT * FROM reserve");
echo "<tr><td>Reserve ID</td><td>Month</td><td>Day</td><td>Year</td><td>Event</td><td>Name</td><td>Address</td><td>Phone Number</td><td>Email</td></tr>";
while($test = mysql_fetch_array($result))
{
$id = $test['id'];
echo "<tr align='center'>";
echo"<td><font color='black'>" .$test['id']."</font></td>";
echo"<td><font color='black'>" .$test['month']."</font></td>";
echo"<td><font color='black'>" .$test['day']."</font></td>";
echo"<td><font color='black'>" .$test['year']."</font></td>";
echo"<td><font color='black'>". $test['event']. "</font></td>";
echo"<td><font color='black'>". $test['name']. "</font></td>";
echo"<td><font color='black'>". $test['address']. "</font></td>";
echo"<td><font color='black'>". $test['phone']. "</font></td>";
echo"<td><font color='black'>". $test['email']. "</font></td>";
echo"<td> <a href ='reserve_edit.php?id=$id'>Edit</a>";
echo"<td> <a href ='reserve_delete.php?id=$id'><center>Delete</center></a>";?>
<td><input type="submit" name="submit" value="Approved" /></td>
<?php
if (isset($_POST['submit']))
{
include 'db.php';
$month=$_POST['month'] ;
$day=$_POST ['day'];
$year=$_POST ['year'] ;
$event=$_POST['event'] ;
mysql_query("INSERT INTO `reqcalendar`(month,day,year,event)
VALUES ('$month','$day','$year','$event')");
}
?>
<?php echo "</tr>";
}
echo "<a href='details.php'>Back <br></a> ";
echo "<a href='reserve_publish.php'>Add to calendar</a> ";
mysql_close($conn);
?>
</table>