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:
|
<?php
$sqlhost = "localhost";
$sqluser = "maurizius";
$sqlpassword = "geheim";
$sqldb = "maurizius";
mysql_connect($sqlhost,$sqluser,$sqlpassword) or die ("Keine
Verbindung möglich"); mysql_select_db($sqldb) or die ("Die Datenbank
existiert nicht");
if($_REQUEST["action"] == "suchen" && !empty($_REQUEST["suche"]))
{
$abfrage = "SELECT * FROM SHOP_Artikel WHERE name LIKE
'%".addslashes(strip_tags($_REQUEST["suche"]))."%' OR beschreibung LIKE
'%".addslashes(strip_tags($_REQUEST["suche"]))."%'";
}
$ergebnis = mysql_query($abfrage);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title></title>
</head>
<body>
<form action="index.php?action=suchen" method=post name="suche">
<input class="input" type="text" name="suche" value="" id="suche"/>
<input type=submit value="Suchen" class="suchesubmit"/>
</form>
</body>
</html> |