Ver originalmysql_query ($query) or die (<script type="text/javascript" > var error= "<?= mysql_error(); ?>"; alert('error');</script>