PHP:
<?PHP
include ("checkuser.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Test</title>
<link rel="SHORTCUT ICON" href="icon.ico">
<link rel="SHORTCUT ICON" href="Logo_kleiner.jpg">
</head>
<body bgcolor="white" text="#990000" link="#0000CC" vlink="#000066" alink="#000000">
<h2 align="center">Neuen Eintrag erstellen</h2>
<form action="erstellen.php" method="post">
<table align="center" border="1" cellpadding="1" cellspacing="0">
<tr>
<th><font color="red">*</font>Titel:</th>
<td><input type="text" name="titel" ></td>
</tr>
<tr>
<th><font color="red">*</font>Sparte:</th>
<td>
<select name="sparte">
<option>medien</option>
<option>Eis</option>
<option>Sahne</option>
<option>Eier</option>
</select>
</td>
</tr>
<tr>
<th><font color="red">*</font>Adresse:</th>
<td><input type="text" name="adresse"></td>
</tr>
<tr>
<th><font color="red">*</font>HausNr.:</th>
<td><input type="text" name="hausnr"></td>
</tr>
<tr>
<th><font color="red">*</font>projekt.:</th>
<td><input type="text" name="projekt"></td>
</tr>
<tr>
<th><font color="red">*</font>Anfrage von:</th>
<td><input type="text" name="anfragevon"></td>
</tr>
<tr>
<th><font color="red">*</font>Verwantes Problem:</th>
<td><input type="text" name="verwantesproblem"></td>
</tr>
<tr>
<th><font color="red">*</font>Priorität:</th>
<td>
<select name="prioriteat">
<option>hoch</option>
<option>normal</option>
<option>niedrig</option>
</select>
</td>
</tr>
<tr>
<th><font color="red">*</font>Kommentar.:</th>
<td><textarea name="kommentar" cols="50" rows="10"></textarea></td>
</tr>
<tr>
<th>Anhang:</th>
<td><input type="file" name="anhang1"><br>
<input type="file" name="anhang2"><br>
<input type="file" name="anhang3"><br>
<input type="file" name="anhang4"><br>
<input type="file" name="anhang5"><br>
<input type="file" name="anhang6"><br>
<input type="file" name="anhang7"><br>
<input type="file" name="anhang8"></td>
</tr>
<tr>
<td><font color="red">* Pflichtfelder</font></td>
<td align="right"><input type="submit" name="erstellen" value="Erstellen"></td>
</tr>
</table>
</form>
</body>
</html>
Funktion:
Man dies Felder aus und die werden dann in eine Datenbank geschrieben.
Problem:
Bevor etwas in die Datenbank geschrieben wird, soll Überprüft werden ob die Felder ausgefüllt worden sind. Wie kann ich des gut lösen, aber nur mit php.
Gruß