Try using... [code]$sql_insert = "insert into payment_records values('$randcode', '$invoiceno', '$amount', $name', $email', $phone', $companyname', $billingaddress', '$billingpostcode', $addresschange'";[/code] ...if you're placing the values into all of the table columns. If you're not placing the values into all of the columns in your table, then you need to specify which colums to insert by... [code]$sql_insert = "insert into payment_records(columns go here) values('$randcode', '$invoiceno', '$amount', $name', $email', $phone', $companyname', $billingaddress', '$billingpostcode', $addresschange')";[/code]