| 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: | <?php
	
	if(isset($_POST['search'])){
		if(empty($_POST['suche'])){
			echo "Bitte etwas eingeben!";
		}
		if(!empty($_POST['suche'])){
			include "../inc/config.inc.php";
			$sql="SELECT
					*
				FROM
					archiv
				WHERE 
					name LIKE %'$_POST[suche]'%";
					
			$result = mysql_query($sql);
			
			if($result == false)
				die("<hr />FEHLER Beim SELECT!<hr />");
				
			if(mysql_num_rows($result)>0){
				echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
				while ($row=mysql_fetch_assoc($result)){
				        ?>
					<tr>
						<td>Bild</td>
						<td><?php echo $row['name']; ?></td>
						<td><?php echo $row['anzahl']; ?></td>
						<td><?php echo $row['ausgeliehen']; ?></td>
						<td><?php echo $row['kategorie']; ?></td>
						<td><?php echo $row['usk']; ?></td>
						<td>more...</td>
					</tr>
					<?php
				}
				echo "</table>";
			} else {
				echo "Ihre Suche war erfolgslos.";
			}
		}
	}
	
?>
<form action="<?php echo $_SERVER[PHP_SELF]. "?section=search"; ?>" method="post">
	<input type="text" name="suche" size="50" maxlength="100" value="Suche eines Films"/>
	<input type="button" name="search" value="Suchen"/>
</form>
 |