/    Sign up×
Community /Pin to ProfileBookmark

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
[url]http://www.powerme.edu/me/images/faculty/70_70/gkumar_2012.jpg[/url]

[code=php]// 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
position.
*/
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’].’, ‘.
$members[$i][‘credentials’].'</a></td>’;

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

$html .= ‘</tr>’;
}
}

}[/code]

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@NoEffinWayJul 24.2012 — What HTML is being out put?
Copy linkTweet thisAlerts:
@captainscallJul 24.2012 — I clicked the link you gave us for the image and apparently that URL doesn't go anywhere. 404 Error. Check your image name and file extension.
Copy linkTweet thisAlerts:
@sirsaulaauthorJul 24.2012 — The link is not real it is just a test example of how my actual link looks like.
Copy linkTweet thisAlerts:
@sirsaulaauthorJul 24.2012 — What HTML is being out put?[/QUOTE]

This is the call i am making at the end of the php script

echo $html
Copy linkTweet thisAlerts:
@NoEffinWayJul 24.2012 — This is the call i am making at the end of the php script

echo $html[/QUOTE]


I understand that, do this: run your script, then right click on the generated page and view source, then paste that here.
×

Success!

Help @sirsaula spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...