Jump to content

Image Not Loading


Xtremer360

Recommended Posts

I have an image that isn't loading and I was hoping someone could tell me why?

 

http://kansasoutlawwrestling.com/upcomingshow2.php

 

<?php echo "<body bgcolor=\"black\" text=\"white\" link=\"red\" vlink=\"red\">"; 

require ('database.php');


print '<center><img src=/images/'.$row['showimage'].' height=125 width=500 border=1></center>';

//Define the query
$query = "SELECT *, DATE_FORMAT(`date`, '%M %e, %Y') AS date FROM shows, matches WHERE matches.showid = shows.id ORDER BY matchid ASC";

if (($r = mysql_query ($query)) && mysql_num_rows ($r)){  

// First row (for the date, location, and time)
$row = mysql_fetch_array ($r);
print '<center>Show Name: '.$row['showname'].'</center>';
print '<center>Date: '.$row['date'].'</center>';
print '<center>Location: '.$row['location'].'</center>';
print '<center>Bell Time: '.$row['belltime'].'</center><br><br>';

// Retrieve and print every record
do {
print '<center>'.$row['matchtype'].' Match</center>';
print '<center>'.$row['vs1'].' vs. '.$row['vs2'].'</center><br>';
} while ($row = mysql_fetch_array ($r));
}  


?> 

Link to comment
Share on other sites

What is in database.php? What is the image supposed to be?

 

If it doesn't need to be changed, then replace:

print '<center><img src=/images/'.$row['showimage'].' height=125 width=500 border=1></center>';

with

print '<center><img src=/images/imagename.jpg height=125 width=500 border=1></center>';

 

Also, <center> tags shouldn't be used anymore, and you should really add quotes around your image source.

Link to comment
Share on other sites

OK, you are not defining "$row['showimage']." You are using that as the variable that holds which image you want to use, but you are not telling the code what that variable should be. Judging by the fact that it is a "$row" variable, I'm guessing that you intended on grabbing the info from a database table, but you aren't selecting any data.

 

To fix this, it's easy: DEFINE $row['showimage']

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.