Bilder Gallery, Bilder nebeneinander?

ShishaLiVe

Mitglied
Hallo liebe Forum User habe ein Problem,


bin grade dabei ein Gallery script zu erstellen wo die bilder aus einer SQL ausgelessen werden, leider werden die Bilder untereinander angezeigt und nicht wie gewollt 2 in reihe, und dann wieder neue reihe gibtes dafür eine lösung?

PHP:
echo "<table width=\"755\" height=\"126\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
  <tr>
    <td>";
    $sql = "SELECT
                ID,
				Bild_id,
				Bild_text,
				Bild_info,
				Bild_hv
            FROM
                s_profil_b
			WHERE                
				Nick = '".$_SESSION['user_nick']."';";
    $result = mysql_query($sql) OR die(mysql_error());
    while($row = mysql_fetch_assoc($result)) {
$pic = $row['Bild_id'];
$bild_text = $row['Bild_text'];
$Bild_info = $row['Bild_info'];
$Bild_hv = $row['Bild_hv'];
?>
	  <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td><a href="<?php echo "$site_user_pic_gross/$pic"; ?>" rel="lightbox[profils]" title="$bild_text"><img src="<?php echo "$site_user_pic_mittel/$pic"; ?>" width="302" height="440" alt="$bild_text"></td>
            </tr>
            <tr>
              <td><div align="center" class="profil_s_b_t">$bild_text</div></td>
            </tr>
          </table></td>
        </tr>
      </table>
<?php
		}
?>   
      </td>
      
  </tr>
  <tr>
    <td><p>&nbsp;</p>
      <table width="750" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="151"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><p class="profil_s_u_t">Lieblings Shisha(s)</p></td>
              </tr>
          </table></td>
          <td width="599" class="profil_s_t_t">$l_shisha</td>
        </tr>
<tr></tr>
      </table>
      <p>&nbsp;</p>
      <table width="750" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="151"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><p class="profil_s_u_t">Tabak / Sorte</p></td>
              </tr>
          </table></td>
          <td width="599" class="profil_s_t_t">$t_sorte</td>
        </tr>
        <tr></tr>
      </table>
      <p>&nbsp;</p>
      <table width="750" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="151"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><p class="profil_s_u_t">Lieblings Kohle</p></td>
              </tr>
          </table></td>
          <td width="599" class="profil_s_t_t">$l_kohle</td>
        </tr>
        <tr></tr>
      </table>
      <p>&nbsp;</p>
      <table width="750" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="151"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><p class="profil_s_u_t">Kopf Set´s</p></td>
              </tr>
          </table></td>
          <td width="599" class="profil_s_t_t">$k_set</td>
        </tr>
        <tr></tr>
      </table>
      <p>&nbsp;</p>
      <table width="750" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="151"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><p class="profil_s_u_t">Shisha Zubehör</p></td>
              </tr>
          </table></td>
          <td width="599" class="profil_s_t_t">$s_zbh</td>
        </tr>
        <tr></tr>
      </table>
      <p>&nbsp;</p>
      <table width="750" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="151"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><p class="profil_s_u_t">Lieblings Online Shop</p></td>
              </tr>
          </table></td>
          <td width="599" class="profil_s_t_t">$l_shop</td>
        </tr>
        <tr></tr>
      </table>
      <p>&nbsp;</p>
      <table width="750" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="151"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><p class="profil_s_u_t">Lieblings Shisha Cafê/ Bar</p></td>
              </tr>
          </table></td>
          <td width="599" class="profil_s_t_t">$l_b_c</td>
        </tr>
        <tr></tr>
      </table>
      <p>&nbsp;</p>
      <table width="750" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="151"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><p class="profil_s_u_t">Tipps &amp; Tricks</p></td>
              </tr>
          </table></td>
          <td width="599" class="profil_s_t_t">$t_t</td>
        </tr>
        <tr></tr>
      </table>
    </td>
  </tr>
</table>
 
Also ich würde des so machen, dass 2Bilder in einer Reihe angezeigt werden, da 2Bilder in einer MySQL-Zeile sind.
Also in der Tabelle ändern und etwas hinzufügen:
Code:
id/.../photo1/...photo2/....
Dann einfach jede Reihe der MySQL auslesen und als Reihe in der .php anzeigen lassen.
 
Zurück