Mailinglisten-Archive |
Hallo Alexander, hallo all die anderen
> More input.
>
> Ich hab noch nicht ganz begriffen, was Du tun willst, kannst Du das mal
> genauer beschreiben? Ruhig auf der Liste.
Ich finde, die Beschreibung ist schon ziemlich genau. Ich versuche es mal
mit einem Code- Anhang.
> Gesundheit
> Wagner
---------Ausschnitt aus first.htm--------------------------------
<form action="index.php" method="post" target="">
{first_select}
</td>
</form>
</tr>
<!-- BEGIN select_template -->
<tr><td colspan="4" height="3"></td></tr>
<tr>
<form action="index.php" method="post" target="">
<td width="267" height="24"> </td>
<td colspan="2" align="right"><img src="images/Nav2-left.gif"
width="206" height="24" border="0"></td>
<td align="left" width="297" height="24" valign="top">
{second_select}
</td>
</form>
</tr>
<!-- END select_template -->
</table>
<!-- BEGIN table_concerts -->
<center>
<TABLE BORDER="0" WIDTH="600" CELLSPACING="2" CELLPADDING="0">
<TR><TD colspan="4" height="50" WIDTH="600"><HR></TD></TR>
<TR><TD colspan="4" height="20" WIDTH="600"> </TD></TR>
<TR>
<TD WIDTH=\"20\" NOWRAP>#</TD>
<TD WIDTH="260" NOWRAP>Artist</TD>
<TD WIDTH="80" NOWRAP>Date</TD>
<TD WIDTH="240" NOWRAP>Location</TD>
</TR>
<!-- BEGIN table_concerts_daten -->
<TR>
<TD WIDTH="20" NOWRAP VALIGN="TOP">
{id}
</TD>
<TD WIDTH="260" NOWRAP VALIGN="TOP">
{artist}
</TD>
<TD WIDTH="80" NOWRAP VALIGN="TOP">
{date}
</TD>
<TD WIDTH="240" NOWRAP VALIGN="TOP">
{location}
</TD>
</TR>
<!-- END table_concerts_daten -->
</TABLE>
</CENTER>
<!-- END table_concerts -->
----------------Ende first html---------------------------
--------------Ausschnitt aus first.php--------------------------
$tpl-> set_block('concerts','table_concerts','table_con');
$tpl->
set_block('table_concerts','table_concerts_daten','table_con_dat');
$query3 = "SELECT * FROM daten";
$query3 .= " WHERE artist LIKE '$SEL_FELD1'";
$query3 .= " ORDER BY date_id,date;";
$db->query($query3);
$treffer= $db->num_rows();
if($treffer > 0){
$tpl-> parse ('table_con','table_concerts',true);
while($db->next_record()){
//variable für anklickbaren Link
$artist = "<A HREF=\"index.php?ID=" . $db->f
("ID") . "&SEL_FELD1=".$SEL_FELD1 ."&SEL_FELD=".$SEL_FELD ."\">";
$artist .= $db->f("artist") != "" ?
htmlentities($db->f("artist")) : " ";
$artist .= "</A>";
$tpl->set_var(array(
"id" => $db->f("ID"),
"artist" => $artist,
"date" => $db->f("date"),
"location" =>htmlentities($db->f("location"))
));
$tpl-> parse ('table_con_dat','table_concerts_daten',true);
}
}
Jetzt habe ich eine Tabelle mit Überschrift und Inhalten erzeugt.
Wenn ich auf den Link $artist klicke, soll die gesammte Tabelle
table_concerts gekillt werden und eine neue Tabelle mit den details erscheinen.
Ich habe es versucht mit:
$query4 = "SELECT * FROM daten WHERE ID = '$ID';";
und dann noch einmal
$tpl-> set_block('concerts','table_concerts','table_con');
$tpl->
set_block('table_concerts','table_concerts_daten','table_con_dat');
etc.. Das klappt nicht, da man die Variablen nicht erst parsen und gleich
darauf noch einmal ausschneiden kann. Hast du eine Idee dazu?
Herzlichen Dank und einen schönen Sonntag
Frank
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
php::bar PHP Wiki - Listenarchive