WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('in-progress') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('pending') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

FileType Validations JavaScript | Loop and Break

FileType Validations JavaScript

To upload only specific type of files from users, we need to restrict them to upload only specific type of files. Following example will demonstrates the same for only uplod of word files.

<html>
<head>
<title>JavaScript Validation</title>
<script type="text/javascript">
    function Checkfiles()
    {
        var fup = document.getElementById('filename');
        var fileName = fup.value;
        var ext = fileName.substring(fileName.lastIndexOf('.') + 1);

    if(ext =="doc" || ext=="docx")
    {
        return true;
    }
    else
    {
        alert("Upload word files only");
        return false;
    }
    }
</script>
</head>
<body>
<form name="xx" action="second.php" method="post" enctype="multipart/form-data" 
onsubmit="return Checkfiles();"">
  <input type="file" name="file_uploading" id="filename">
  <input type="submit" value="Submit" name="uploadfile">
</form>
</body>
</html>
Share

You may also like...