Einzelnen Beitrag anzeigen
Alt 13.09.2003, 22:43   #6
dreamer
Veteran
 
Registriert seit: 05.06.2001
Alter: 51
Beiträge: 259


Standard

ich würds so machen:

formular
--------------------
<td><select name="typ">
<option value="Kerze" <?php if($typ=='Kerze') echo"selected"; ?>>Kerze
<option value="Spiegel" <?php if($typ=='Spiegel') echo"selected"; ?>>Spiegel
<option value="Bild" <?php if($typ=='Bild') echo"selected"; ?>>Bild
<option value="0" <?php if($typ=='not null') echo"selected"; ?>>alle
</select></td>


script:
--------------------------

if ($_POST[typ] == "0"){
$SQLString = "SELECT * FROM shop";
}
else {
$SQLString = "SELECT * FROM shop WHERE Typ = '$_POST[typ]'";
}


gruss
dreamer
____________________________________
lg, thx usw.
dreamer
dreamer ist offline   Mit Zitat antworten