aber du brauchst erstmal irgendwo das sogenannte formular:
PHP-Code:
<form name="suchform" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="text" name="suchstring" size="20" maxlength="100">
<input type="submit" name="SubmitSuchen" value="suche">
</form>
PHP-Code:
<?php
if(isset($_POST["SubmitSuchen"]))
{
// mysql db durchsuchen
$sql = mysql_query("SELECT spalte FROM ".$table."
WHERE spalte LIKE '".mysql_escape_string($_POST["suchstring"])."%'
ORDER BY spalte2");
while ($data = mysql_fetch_assoc($sql))
{
echo $data["spalte"]."<br>";
}
}
Einen Kommentar schreiben: