$ris = mysql_query($sql, $cn);
if (!$ris) {
echo "<script>alert(\"error: mysql_error()); history.go(-1)</script>";
exit;
}