Results 1 to 3 of 3

Thread: Pictures not displaying

  1. #1
    Join Date
    Jun 2012

    Pictures not displaying

    I am using PHP to output an HTML table but when it does the pictures refuses to display.

    The php array $members['smallimg'] linkts to the .jpg file for example

    PHP Code:
    // If there is at least 1 member listed as Faculty, then we are going to get the header and table set up and ready to display each member.
    if ($facultyfound == true)
    $html .= '<h2><a name="faculty"></a>Faculty</h2>';
    $html .= '<tr>';
    $html .= '<th width="12%">Photo</th>';
    $html .= '<th width="11%">Name</th>';
    $html .= '<th width="9%">Title</th>';
    $html .= '<th width="14%">Contact</th>';
    $html .= '<th width="54%">Research</th>';
    $html .= '</tr>';
            for (
    $i 0$i $size$i++)
                    While we are looping through the for loop, we check each node to see if that node's information corresponds to the given department
                    shortname and that the member is Faculty. If that is true, then we display the necessary information about them. If the XML element
                    that normally contains information is actully empty, then it will just leave that space empty on the table as well in the corresponding
    if ($members[$i]['department'] == $thedepartment && $members[$i]['facultytype'] == 'Faculty')
    $html .= '<tr name="'.$members[$i]['shortname'].'">';
    $html .= '<td style="vertical-align: middle; text-align: center;"><a name="'.$members[$i]['shortname'].'"></a><img src="'.
    $members[$i]['smallimg'].'" width="70" height="70"></td>';
    $html .= '<td style="vertical-align: middle; text-align: center;"><a href="http://www.power.edu/'.$deptURL.'/faculty/faculty.php?name='.
    $members[$i]['firstname'].' '.$members[$i]['lastname'].'">'.$members[$i]['firstname'].' '.$members[$i]['lastname'].', '.

    $html .= '<td style="vertical-align: middle; text-align: center;">'.$members[$i]['title'].'</td>';
    $html .= '</tr>';

  2. #2
    Join Date
    Jul 2012

    its the url causing it

    i think you will find its the url its too long rename it short

    try that php is very critical ! it can disable it

    iam sure its just that as i cant see any promblems in the code itself

    other than that i dont know

  3. #3
    Join Date
    Mar 2011
    The easy way to diagnose this is to load the page in your browser as any user would, and then examine the HTML for the page with the 'View Source' command. You'll almost certainly find that the 'src' attribute for your <img> tags is malformed - in particular, the directory path is probably incorrect.
    Rick Trethewey
    Rainbo Design

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center