ERLEDIGT
NEIN
NEIN
ANTWORTEN
2
2
ZUGRIFFE
262
262
EMPFEHLEN
-
04.05.08 21:07 #1
- 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> </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> </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> </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> </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> </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> </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> </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> </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 & 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:
Dann einfach jede Reihe der MySQL auslesen und als Reihe in der .php anzeigen lassen.Code :1
id/.../photo1/...photo2/....
-
04.05.08 22:22 #3
- 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
-
3 Bilder Nebeneinander
Von Gorlh im Forum PHPAntworten: 2Letzter Beitrag: 06.04.07, 15:23 -
Bilder nebeneinander!!
Von Headymaster im Forum PHPAntworten: 16Letzter Beitrag: 12.11.06, 19:20 -
Bilder nebeneinander
Von rustyNET im Forum PHPAntworten: 5Letzter Beitrag: 09.11.06, 17:53 -
Bilder Gallery
Von Blümchen im Forum PHPAntworten: 12Letzter Beitrag: 18.07.05, 08:05 -
Bilder Gallery
Von Borsti26 im Forum Swing, Java2D/3D, SWT, JFaceAntworten: 2Letzter Beitrag: 27.05.05, 15:15





Zitieren
Login






[PHP][Snippet] Array zu XML konvertieren