06-08-2010, 04:19 PM
|
#6 (permalink)
|
|
The Contributor
Join Date: Jan 2009
Posts: 48
Thanks: 5
|
Quote:
Originally Posted by delayedinsanity
Let's clean up the code a little before we start narrowing down where the issue is - I noticed you are using getimagesize() to find the dimensions of the image, but you're using a custom function to determine the file type.
Never trust a file extension to be what it says it is. I could easily rename an executable to dot jpg and trick your script into believing it was an image - getimagesize will attempt to return the correct mime-type for the file that has been uploaded if your expecting only images. The other option would be <a href="http://us3.php.net/manual/en/ref.fileinfo.php">FileInfo</a> but I don't see any reason you wouldn't be just fine using getimagesize.
I'm not seeing the JavaScript that VI is mentioning but maybe I missed something there; outside of that, zomg, I haven't seen the CENTER element since Netscape.
|
Yeah sorry about the center tags, I was just trying to breeze through it to get a working beta. I usually use all divs, but I didn't want to go through all the trouble of styling at the moment so I just coded it the fastest way possible.
Quote:
Originally Posted by Village Idiot
Never mind what I said, for some reason I thought that was javascript. Looking at it again I have no clue why.
|
Heh, no worries. Yeah the only JS that's being used is shadowbox to show the page.
Anyway, I'll revise the code and clean it up a bit. Should be a couple of hours but I'll have a revised code posted soon.
Thanks for the help guys!
|
|
|
|