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:
|
<?php
if (isset($_GET[answer])) {
echo "
An:<br>
$_GET[answer] <br>
<form action=$_SERVER[PHP_SELF] method=post>
Nachricht: <br>
<textarea name=msg rows=10 cols=50></textarea><br>
<input type = submit value = Abschicken name = send>
</form>
";
if (isset($_POST[send])) {
$today = time();
$from = $name;
$msg = $_POST[msg];
$to = $_GET[answer];
$sql2 = "INSERT INTO `inbox` (`id`, `from`, `to`,`msg`,`date`) VALUES
('', '$from', '$to', '$msg', '$today')";
$res = mysql_query($sql2);
if ($res) {
echo "Deine Nachricht wurde abgeschickt";
}
}
}
?>
|