$timestamp = time();
$datum = date("d.m.Y - H:i",$timestamp);
$gbname = $_POST['gbname'];
$gbemail = $_POST['gbemail'];
$gbpage = $_POST['gbpage'];
$gbicq = $_POST['gbicq'];
$gbtext = $_POST['gbtext'];
$gbkom = $_POST['gbkom'];
$ok = true;
if (isset($gbname)) {
if ($gbname != "" && $gbtext != "") {
$ok = true;
} else {
$ok = false;
}
}
if (isset($gbname)) {
if ($ok==true) {
include("dbcon.php");
mysql_select_db($dbname);
mysql_query("INSERT INTO gaestebuch(gbdate, gbname, gbemail, gbpage, gbicq, gbtext, gbkom)VALUES('$datum','$gbname','$gbemail','$gbpage','$gbicq','$gbtext','$gbkom')");
header("Location: gbindex.php");
}
dbcon.php geht. wenn ich passwort oder ähnliches veränder kommt die Fehlermedldung Verbindung zur db fehlgeschlagen.
Martin