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? Link to comment https://forums.phpfreaks.com/topic/59112-php-code-not-displaying-on-page-correctly/ 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? Link to comment https://forums.phpfreaks.com/topic/59112-php-code-not-displaying-on-page-correctly/#findComment-293520 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. Link to comment https://forums.phpfreaks.com/topic/59112-php-code-not-displaying-on-page-correctly/#findComment-293524 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"; ?> Link to comment https://forums.phpfreaks.com/topic/59112-php-code-not-displaying-on-page-correctly/#findComment-293538 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? Link to comment https://forums.phpfreaks.com/topic/59112-php-code-not-displaying-on-page-correctly/#findComment-293562 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']); ?> Link to comment https://forums.phpfreaks.com/topic/59112-php-code-not-displaying-on-page-correctly/#findComment-293565 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 Link to comment https://forums.phpfreaks.com/topic/59112-php-code-not-displaying-on-page-correctly/#findComment-293570 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. Link to comment https://forums.phpfreaks.com/topic/59112-php-code-not-displaying-on-page-correctly/#findComment-293582 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 Link to comment https://forums.phpfreaks.com/topic/59112-php-code-not-displaying-on-page-correctly/#findComment-294363 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.