ich habe folgenden Code als .php in 'include/contents/' gestopft. Leider öffnet sich die Seite im selben Fenster und es wird nur die Tabelle angezeigt.
Wie bekomme ich es hin, dass die Seite im CMS unter {EXPLODE} eingefügt wird, so dass ich noch meine Menüs usw. weiter habe?
Danke für Hilfe
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | <?php require_once ( 'connect.php' ); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <head> <title>Tabelle</title> <meta http-equiv= "Content-Language" content= "de" /> <meta http-equiv= "Content-Type" content= "text/html; charset=iso-8859-1" /> <style type= "text/css" > a img { border: 0; } table.ausgabe { border-collapse: collapse; width: 500px; } table.ausgabe td { width: 71px; text-align: center; border: 1px solid black; } a:link.t, a:visited.t { color: black; text-decoration: none; } </style> </head> <body> <table class = "ausgabe" > <tr> <td><?php echo intval ( $_GET [ 's' ]) == 1 ? '<img src="asc.png" alt="" />' : '' ; ?><strong><a class = "t" href= "?s=1" >Spalte1</a></strong></td> <td><?php echo intval ( $_GET [ 's' ]) == 2 ? '<img src="asc.png" alt="" />' : '' ; ?><strong><a class = "t" href= "?s=2" >Spalte2</a></strong></td> <td><?php echo intval ( $_GET [ 's' ]) == 3 ? '<img src="asc.png" alt="" />' : '' ; ?><strong><a class = "t" href= "?s=3" >Spalte3</a></strong></td> <td><?php echo intval ( $_GET [ 's' ]) == 4 ? '<img src="asc.png" alt="" />' : '' ; ?><strong><a class = "t" href= "?s=4" >Spalte4</a></strong></td> <td><?php echo intval ( $_GET [ 's' ]) == 5 ? '<img src="asc.png" alt="" />' : '' ; ?><strong><a class = "t" href= "?s=5" >Spalte5</a></strong></td> <td><?php echo intval ( $_GET [ 's' ]) == 6 ? '<img src="asc.png" alt="" />' : '' ; ?><strong><a class = "t" href= "?s=6" >Spalte6</a></strong></td> <td><?php echo intval ( $_GET [ 's' ]) == 7 ? '<img src="asc.png" alt="" />' : '' ; ?><strong><a class = "t" href= "?s=7" >Spalte7</a></strong></td> </tr> <tr> <?php $sql = 'SELECT * FROM `' . $dbtabellenname . '` ORDER BY `' .${ 'spalte' . intval ( $_GET [ 's' ])}. '`, `' . $spalte1 . '` ASC' ; $query = mysql_query( $sql ) or die (mysql_error()); while ( $ds = mysql_fetch_object( $query )){ echo '<tr><td>' . $ds -> $spalte1 . '</td><td>' . $ds -> $spalte2 . '</td><td>' . $ds -> $spalte3 . '</td><td>' . $ds -> $spalte4 . '</td><td>' . $ds -> $spalte5 . '</td><td>' . $ds -> $spalte6 . '</td><td>' . $ds -> $spalte7 . '</td></tr>' ; } ?> </tr> </table> </body> </html> <?php ob_end_flush(); ?> |