- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Client-side image processing with HTML
For client-side processing and uploading, you can try to run the following code −
<?php if (isset($_FILES["image"])) { $ iSize = getimagesize($_FILES["image"]["tmp_name"]); if ($iSize!== false) { $myFile = "/tmp/" . basename($_FILES["image"]["name"]); if (move_uploaded_file($_FILES["image"]["tmp_name"], $myFile)) { echo "File stored at " . $myFile; } else { echo "Image storage failed!"; } } else { echo "This isn’t an image!"; } } else { echo "Image not available to upload!"; } ?>
Advertisements