jumpenjuhosaphat Posted January 19, 2007 Share Posted January 19, 2007 Okay, I am doing a script for a person in the UK, I am in the USA. I am not having any troubles uploade .jpg's to the site, but she can't seem to do it without getting it caught in an error. Here is the code that produces the error:[code] if($_FILES['adupload']['size']==0) { $error['adupload']="File is empty!"; } if($_FILES['adupload']['type']!="image/jpeg") { $error['adupload']="Invalid image type, not a jpg"; }[/code]The error she is getting is "Invalid image type, not a jpg". I had her send me the jpg in the email, and I uploaded it fine, but she still cannot. What could be the reason for this? Link to comment https://forums.phpfreaks.com/topic/34889-image-upload-issues-help-please/ Share on other sites More sharing options...
jumpenjuhosaphat Posted January 19, 2007 Author Share Posted January 19, 2007 I set up an account at http://www.fumbug.co.uk/login.phpLogin details:Username: phpfreakPassword: freakIf you could try to upload an image in jpg format that would be nice. You would need to go to Create a New Ad in the menu on the left after signing in. Link to comment https://forums.phpfreaks.com/topic/34889-image-upload-issues-help-please/#findComment-164466 Share on other sites More sharing options...
JJohnsenDK Posted January 19, 2007 Share Posted January 19, 2007 try this:[code] if($_FILES['adupload']['size']==0) { $error['adupload']="File is empty!"; } if($_FILES['adupload']['type']!="image/jpeg" || $_FILES['adupload']['type']!="image/pjpeg") { $error['adupload']="Invalid image type, not a jpg"; }[/code] Link to comment https://forums.phpfreaks.com/topic/34889-image-upload-issues-help-please/#findComment-164469 Share on other sites More sharing options...
jumpenjuhosaphat Posted January 19, 2007 Author Share Posted January 19, 2007 Still getting the same problem. She told me that she can upload using firefox, but IE7 is where she gets the issue. Link to comment https://forums.phpfreaks.com/topic/34889-image-upload-issues-help-please/#findComment-164475 Share on other sites More sharing options...
jumpenjuhosaphat Posted January 19, 2007 Author Share Posted January 19, 2007 So now, I can't even upload files from my computer. WHat's going on? It worked fine 10 minutes ago, uploaded several jpg's as tests, no the same jpg's won't upload. Link to comment https://forums.phpfreaks.com/topic/34889-image-upload-issues-help-please/#findComment-164509 Share on other sites More sharing options...
jumpenjuhosaphat Posted January 19, 2007 Author Share Posted January 19, 2007 I got it fixed, the || should have been an && instead. I don't know if there are still issues though, I haven't heard back from my person in the uk yet, if it's fixed, I'll be back to change this to solved, if not, I'll still be searching for solutions. Link to comment https://forums.phpfreaks.com/topic/34889-image-upload-issues-help-please/#findComment-164525 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.