Jump to content

PHP Code not Displaying on page correctly


jiggens

Recommended Posts

<?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?

 

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.

 

 

 

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";
?>

<?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']);
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.