Hallo!
Ich habe ein Gästebuch geschrieben. Das Problem: Es funktioniert nur in Firefox. Im IE ist der Browser weiß.
Vieleicht könnt ihr mir helfen.
Hier der CODE:
-Anfang--------------------------------------------
<html>
<head>
<title>Gästebuch</tilte>
</head>
<body bgcolor="#000000" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF">
<center>
<br>
<table background="hintergrund.jpg" width="480" height="480" border="0">
<form action="Guestbook.php" method="post">
<tr height="285"></tr>
<tr>
<td width="180"></td>
<td><b>Name:</b></td>
<td><input type="text" name="name"></td>
<td></td>
</tr>
<tr>
<td></td>
<td><b>Homepage:</b></td>
<td><input type="text" name="url" value="http://"></td>
<td></td>
</tr>
<tr>
<td></td>
<td><b>Deine Nachricht:</b></td>
<td><textarea name="text" rows="5"></textarea></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td><input type="submit" name="submit" value="Eintrag senden"></td>
<td></td>
</tr>
<tr></tr>
</form>
</table>
<br><br>
<?php
$db = mysql_connect("localhost","USER","**PASSWORT**");
if($_POST["submit"])
{
$name = $_POST["name"];
$url = $_POST["url"];
$text = $_POST["text"];
$date = date("d") . ". " . date("M") . " " . date("Y") . " - " . date("H") . ":" . date("i");
$ip = $_SERVER['REMOTE_ADDR'];
$insert = "INSERT INTO tabelle (name, url, text, date, ip) VALUES ('$name', '$url','$text', '$date', '$ip')";
mysql_db_query("DATABASE",$insert);
}
$abfrage = "SELECT * FROM tabelle ORDER BY id DESC";
$result = mysql_db_query("DATABASE",$abfrage);
$num = mysql_num_rows($result);
$eintraege= $num;
echo("<table rowspan='0' width='550' cellspacing='0' border='0'>");
for($i=0; $i < $num; $i++)
{
$name = mysql_result($result, $i, "name");
$url = mysql_result($result, $i, "url");
$text = mysql_result($result, $i, "text");
$datum = mysql_result($result, $i, "date");
echo("
<tr bgcolor='#666666'>
<td align='left'>$eintraege) $name</td>
");
if($url != "http://" AND $url != "")
{
echo("
<td align='center'><a href='$url' target='_blank'>Homepage</td>
");
}
if($url == "http://" OR $url == "")
{
echo("
<td align='center'></td>
");
}
echo("
<td align='right'>$datum</td>
</tr>
<tr height='2'></tr>
<tr>
<td colspan='3' bgcolor='#333333'><div>$text</div></td>
</tr><tr height='20'></tr>
");
$eintraege --;
}
echo("</table>");
mysql_close($db);
?>
</center>
</body>
</html>
-Ende----------------------------------------------