Jump to content

Small Error


divinedesigns1

Recommended Posts

:glare: dont tell me where the error is, just let me know if i did something wrong or not :good: so i got everything working after having a few errors on both pages, so those working now but now i have this little problem tr> 4975 Name: dwayne Date: 2012-04-22 04:47:39 unverified.gif tr> 3936483 Name: dwayne Date: 2012-04-22 04:49:41 unverified.gif the those tr> tr> aint suppose to do that i close all the tags, kindly let me know if i leave any open
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head><body><?php//connect to the database$conn =  mysqli_connect('', '', '', '');//retrieve the score data form$query = "SELECT * FROM scorekeeper";$data = mysqli_query($conn, $query);//loop through the array of data, formatting it as HTMLecho '<table>';while($row = mysqli_fetch_array($data)){//Display the score dataecho '<tr><td class="scoreinfo">';echo '<span class="score">' . $row['score'] . '</span><br/>';echo '<strong>Name: </strong>' . $row['name'] . '<br/>';echo '<strong>Date: </strong>' . $row['date'] . '</td>';if(is_file($row['screenshot']) && filesize($row['screenshot']) > 0 ) {  echo '<td><img src="' . $row['screenshot'] . ' alt="score image" /></td></tr>';}else {  echo '<td><img src="unverified.gif" alt="unverified score" /></td></tr>';}}echo '</table>';mysqli_close($conn);?></body></html>

:Pleased: remember no telling where the error is, just say if i close or didnt close something or if theres any error in it at all or typos thanks :Pleased: <-- handsome as emotional icon lol

Link to comment
Share on other sites

the only error i see is
echo '<td><img src="' . $row['screenshot'] . ' alt="score image" /></td></tr>';

should be echo '<td><img src="' . $row['screenshot'] . '" alt="score image" /></td></tr>';

:Pleased: thank you that was the mistake
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...