Jump to content

jonesypeter

Members
  • Posts

    4
  • Joined

  • Last visited

jonesypeter's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Many thanks for the reply. I have the field 'title' I can use. So I have done: echo "<td rowspan=3><img alt=\"".$row['title']."\" src=\"".$row['image_1']."\" > </td>"; The rendered HTML code comes through as: <td rowspan=3><img alt="Firelord" src="/images/spectrum/loading/Firelord.gif" > http://retro.getfreehosting.co.uk/retroseek.php?pid=1 The trouble is that the alt tag title is not appearing when I hover over the image Thanks Peter
  2. Hello, I'm trying to add an alt tag to an image I am retrieving from a MySQL database but I am really struggling. The image is displayed with: echo "<td rowspan=3><img src=\"".$row['image_1']."\" > </td>"; What do I add include: alt="some_text" Many thanks Peter Jones
  3. Hello, Many thanks for this. I am now all sorted. Best wishes Peter Jones
  4. Hi, I'm trying to display some records from a MySQL database which worked fine. I have now changed the code to display in image and I seem to have broken it. Could anybody help me sort this out? Many thanks Peter Jones // Table header. echo '<table align="center" cellspacing="3" cellpadding="3" width="75%"> <tr><td align="left"><b>Title</b></td><td align="left"><b>Publisher</b></td><td align="left"><b>Release Year</b></td></tr> '; // Fetch and print all the records: while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)) { echo '<tr><td align="left"><img src="/images/spectrum/game/' . $row['image'] . '" alt="some_text">' . '</td><td align="left">' . $row['publisher'] . '</td><td align="left">' . $row['rel_year']. '</td></tr> } echo '</table>'; // Close the table.
×
×
  • 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.