I want to keep audit of transactions. I have two tables, one acting as the main table and the other acting as a copy of the main table (audit) with some of the field copied to the audit table.
The following is my code but data is not been written to the audit table.
Your help is welcome
$traveller = $_REQUEST['traveller'];
$requestdate = $_REQUEST['requestdate'];
$sqlinsert="INSERT INTO `internationaltravel` (`traveller`,`requestdate`)
$last_inserted_id = mysql_insert_id();
$sqlinsert_audit="INSERT INTO `audit` (`date`,`initiator`,`transid`)