Code:
<html> <head> <style type="text/css"> <!-- body, table { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; background-color: #6B6B6B; } h1 { font-size: 14px; } table { background-color: #000000; } td { background-color: #6B6B6B; } th { background-color: #CCCCCC; } --> </style> </head> <body> <div align="center"><h1> <?php //check get data if ( !isset($_GET['s'])) { $s = "1"; // zb } else $s = $_GET['s']; ?> <?php //zur DB connecten $db = mysql_connect("localhost", "root", ""); //db auswählen mysql_select_db("test", $db); // MySQL-Abfrage starten $sql = "SELECT `category` FROM `category` WHERE `id` = '" . addslashes($s) . "'"; $result = mysql_query($sql); $data = mysql_fetch_array($result); echo $data['category']; ?> </h1></div> <br> <table width="75%" border="0" align="center" cellpadding="2" cellspacing="1"> <tr> <th>Datum</th> <th>Titel</th> <th>Crew</th> <th>Nfo</th> <th>Link</th> </tr> <?php // MySQL-Abfrage starten $sql = "SELECT * FROM nfo WHERE category='" . addslashes($s) . "'"; $result = mysql_query($sql); while($data = mysql_fetch_array($result)) { echo " <tr>"; echo '<td style="text-align:center;">', $data['datum'], '</td>'; echo " <td>".$data['nfo_name']."</td>"; echo '<td style="text-align:center;">', $data['group'], '</td>'; echo '<td style="text-align:center;">', $data['nfo'], '</td>'; echo '<td style="text-align:center;">', $data['link'], '</td>'; echo " <tr>"; } ?> <?php // MySQL-Abfrage starten $sql = "SELECT * FROM nfo WHERE category=".$_GET['id']." AND name LIKE '%".$_GET['search']."%'"; $result = mysql_query($sql); ?> </table> </body> </html>
$result = mysql_query($sql);
aber haut net ganz hin da er die komplette category ausgibt ?
kann mir jemand bitte helfen ?
Danke
Comment