jiggens Posted July 9, 2007 Share Posted July 9, 2007 <?php if ($ID != "" && $ID != "new") { if (file_exists("/homes/html/images/browse/logos/" . $ID . ".jpg")) { print "<img src='http://homes.domain.com/images/browse/logos/" . $ID . ".jpg' />"; print "<input type='submit' name='deleteImage' value='Delete Logo' />"; print "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"30000\" />"; print "<br />"; } print "<input name='newLogo' type='file' size='40' /><input type='submit' name='uploadNewLogo' value='Upload' />"; } ?> Is there something wrong with my tagging? Quote Link to comment Share on other sites More sharing options...
mpharo Posted July 9, 2007 Share Posted July 9, 2007 Looks good to me, what seems to be the actual problem? Quote Link to comment Share on other sites More sharing options...
jiggens Posted July 9, 2007 Author Share Posted July 9, 2007 Well with the if statement in if (file_exists("/homes/html/images/browse/logos/" . $ID . ".jpg")) { after i upload the image it doesn't display on the upload page however it does display on the page of the actual site, i just want to see if there is a image uploaded already. Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted July 9, 2007 Share Posted July 9, 2007 i checked the code and assigned a temp value for $ID, it works fine.. you should check value of $ID; <?php $ID="favicon"; if ($ID != "" && $ID != "new") { if (file_exists("/home/md5hash/www/portal/" . $ID . ".ico")) { print "<input type='submit' name='deleteImage' value='Delete Logo' />"; print "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"30000\" />"; print "<br />"; } print "<input name='newLogo' type='file' size='40' /><input type='submit' name='uploadNewLogo' value='Upload' />"; }else echo "err"; ?> Quote Link to comment Share on other sites More sharing options...
jiggens Posted July 9, 2007 Author Share Posted July 9, 2007 Could it be a factor that this code was originally written for Unix and its now transferred to Windows with IIS 6.0 i am using php 5 and mysql 5 as well? Quote Link to comment Share on other sites More sharing options...
jiggens Posted July 9, 2007 Author Share Posted July 9, 2007 <?php $ID = $_GET['ID']; $siteID = $_GET['siteID']; $uploaddir = '/Inetpub/wwwroot/homes/html/images/temp/'; $uploadfile = $uploaddir . basename($_FILES['newMap']['name']); $uploadfile2 = $uploaddir . basename($_FILES['newLogo']['name']); $uploadfile3 = '/Inetpub/wwwroot/homes/html/browse/brochures/' . basename($_FILES['newBrochure']['name']); $uploadfile4 = '/Inetpub/wwwroot/homes/html/images/browse/banners/' . $ID . ".jpg"; $uploadfile5 = '/Inetpub/wwwroot/homes/html/browse/features/' . basename($_FILES['newFeatures']['name']); ?> Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted July 9, 2007 Share Posted July 9, 2007 OS is not a big factor to that code.. you can always print your variables to check if it has a value Quote Link to comment Share on other sites More sharing options...
jiggens Posted July 9, 2007 Author Share Posted July 9, 2007 It displays correctly on the official page, but not the upload page, i checked my variables and everything is working but the actual displaying on the upload page. I am really stumped on this. Quote Link to comment Share on other sites More sharing options...
jiggens Posted July 10, 2007 Author Share Posted July 10, 2007 Could if statement be imcomplete? this worked on a unix server now on windows Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.