"; echo "View your answer"; // If added new answer, add value +1 in reply column $tbl_name2="fquestions"; $sql3="UPDATE $tbl_name2 SET reply='$Max_id' WHERE id='$id'"; $result3=mysql_query($sql3); } else { echo "ERROR"; } // Close connection mysql_close(); ?>