Data insert status: Duplicate entry '' for key 'referenceNo'
Means you are inserting the data with the same referenceNo in database that already present in the database.
And you have the constraint on this column not to insert the duplicate entry. So you need to try with new one referenceNo
. And the data is not inserting that data.
You can debug the data that what is returning data by:
print_r($_REQUEST);
And you will get that what data is coming in return.