I am a beginner in making a web page using HTML, JavaScript, and PHP. I am now working on a web page for the user to upload an image with a specific dimension and extension because of my code was written before and can be used only in particular requirements.
The code for uploading the image is as follows:
<form name="images" method="POST" action="send.php">
<label>Some text</label>
<input type="text" name="someText"/>
<label>The image: </label>
<input id="img" type="file" name="imageUpload" accept=".jpg"/><br/>
<input type="submit" value="submit"/>
</form>
I have search through the Internet and tried a number of solutions provided, but I could not solve the problem. Are there any other ways to deal with the problem. Thank you very much!
The solution I have tried: http://blog.xuite.net/mark.wu/x/49421803-上傳檔案前,JavaScript檢查檔案格式、大小+ https://zhidao.baidu.com/question/488777030449774252.html