tutorials.de Buch-Aktion 05/2012
ERLEDIGT
NEIN
ANTWORTEN
2
ZUGRIFFE
262
EMPFEHLEN
  • An Twitter übertragen
  • An Facebook übertragen
AUF DIESES THEMA
ANTWORTEN
  1. #1
    ShishaLiVe ShishaLiVe ist offline Mitglied Bronze
    Registriert seit
    Mar 2008
    Beiträge
    48
    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-Code:
    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>
     

  2. #2
    matze93 matze93 ist offline Mitglied Silber
    Registriert seit
    Apr 2008
    Beiträge
    93
    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 :
    1
    
    id/.../photo1/...photo2/....
    Dann einfach jede Reihe der MySQL auslesen und als Reihe in der .php anzeigen lassen.
     

  3. #3
    ShishaLiVe ShishaLiVe ist offline Mitglied Bronze
    Registriert seit
    Mar 2008
    Beiträge
    48
    nicht würklich das was ich suche, ist auch net möglich wegem dem user panel
     

Ähnliche Themen

  1. 3 Bilder Nebeneinander
    Von Gorlh im Forum PHP
    Antworten: 2
    Letzter Beitrag: 06.04.07, 15:23
  2. Bilder nebeneinander!!
    Von Headymaster im Forum PHP
    Antworten: 16
    Letzter Beitrag: 12.11.06, 19:20
  3. Bilder nebeneinander
    Von rustyNET im Forum PHP
    Antworten: 5
    Letzter Beitrag: 09.11.06, 17:53
  4. Bilder Gallery
    Von Blümchen im Forum PHP
    Antworten: 12
    Letzter Beitrag: 18.07.05, 08:05
  5. Bilder Gallery
    Von Borsti26 im Forum Swing, Java2D/3D, SWT, JFace
    Antworten: 2
    Letzter Beitrag: 27.05.05, 15:15