PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have the following code to upload image.
Is there an easy way to limit the image dimensions ( and/or file type since i had to hardcode it here to jpg)
I'm pretty sure there's no way to restrict image dimensions before submitting the form. You can certainly read the file before processing it - but that has to happen after the upload.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.