avoid duplicate value insertion on page refresh in php

TO AVOID DUPLICATE VALUE INSERT IN CORE PHP ON REFRESH::

During the post value insertion in the database, after refresh duplicate value inserted in the table.
To avoid this, we can redirects after insertion to the same page.
It will destroy the post values.
code is::
header('Location: '.$_SERVER['PHP_SELF'].'?data=1);
die;

populate popup page using javascript

SHOW POPUP::

Javascript Code:
function showmepop(plink,pname)
{
    window.open(plink, pname, "top=10,left=20,width=600,height=400");  
}

Html code::
<button onclick="showmepop('<?php echo $QUOTELINK;?>','test');">View</button>

Get select box value among many select box using Jquery

AFTER APPEND IN BODY.. We Can Get value of selected select box using jquery.
It works. checked already..
$(document).on('change', "select.optn", function () 
{
    var ID = $(this).attr("id");
    alert(countryID);
});