<?php 
$con = mysql_connect('localhost','silver_tresor','admin.123');
if (!$con){
  die('Could not connect: ' . mysql_error());
}

mysql_select_db("silver_tresorjewellery", $con);

$products = mysql_query('SELECT distinct product_id from product where status=1');
while($product = mysql_fetch_array($products)) {



}
if(!$gemname)
{
  die('Could not update data: ' . mysql_error());
}
echo "Updated data successfully\n";
mysql_close($con);
?>
<script type="text/javascript">
function wait() 
{
  xmlhttp=GetXmlHttpObject();
  var url="wait.php"; \
  xmlhttp.onreadystatechange=statechanged; 
  xmlhttp.open("GET", url, true); 
  xmlhttp.send(null);
} 

function statechanged()
{ 
  if(xmlhttp.readyState==4) {
       document.getElementById("txt").innerHTML=xmlhttp.responseText;
  }
} 
</script>