Losj
11-03-2012, 01:40 PM
I have a page which works fine on Chrome etc. but with IE it does not even send the form! It jumps in the wrong place and , on plus, the css doesn't work after the send of the form. I get a corrupted sight.
I used metatag for IE 8, it does not work without as well.
Do you know the reason?
Link:
http://www.artkom.ch/anna/gaestebuch.php
Code:
<?php
session_start();
$host = "";
$user = "";
$password = "";
$db = "";
$link = mysql_connect($host, $user, $password) or die("Fehler beim verbinden mit dem Datenbankserver");
mysql_select_db($db) or die("Fehler beim verbinden mit der Datenbank");
if (!isset($_POST['form_datum'])) $_POST['form_datum'] = '';
if (!isset($_POST['form_email'])) $_POST['form_email'] = '';
if (!isset($_POST['form_text'])) $_POST['form_text'] = '';
if (isset($_POST['upload']))
{
if(isset($_SESSION['captcha_spam']) && $_POST["sicherheitscode"] == $_SESSION['captcha_spam'])
{
unset($_SESSION['captcha_spam']);
if (isset($_POST['form_datum']) && ($_POST['form_email']) && ($_POST['form_text']))
{
$sql = "INSERT INTO gaestebuch (datum, email, text) VALUES (
'".$_POST['form_datum']."',
'".$_POST['form_email']."',
'".$_POST['form_text']."'
)";
$result = mysql_query($sql);
if ($result=='1') {
header("Location: http://www.artkom.ch/anna/gaestebuch.php"); /* Browser umleiten */
exit;
}
else
{
header("Location: http://www.artkom.ch/anna/gaestebuch.php"); /* Browser umleiten */
exit;
}
}
else
{
$status = "...fehlgeschlagen '".mysql_error()."'";
}
}
else if (isset($_POST['form_datum']) && ($_POST['form_text']) && $_POST["sicherheitscode"] != $_SESSION['captcha_spam'])
{
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> '; ?>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>Anna Warzinek</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description"
<meta name="keywords"
<meta name="Robots" content="INDEX,FOLLOW">
<meta name="Revisit" content="After 30 days">
<link href="scripts/anna_warzinek_main.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="jscode.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="/scripts/jquery.ez-bg-resize.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("body").ezBgResize({
img : "grafik/hintergrund_gaestebuch.png", // Relative path example. You could also use an absolute url (http://...).
opacity : 1, // Opacity. 1 = 100%. This is optional.
center : true // Boolean (true or false). This is optional. Default is true.
});
});
</script>
</head>
<body >
<div id="main" >
<div id="logo"><img src="grafik/aw_logo.png" alt="anna warzinek" border="0" width="370"></div>
<div align="left" id="navi">
<a href="index.php" OnMouseover = "Wechseln('navi1','Homeimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi1','Homeimg');Wechseln('navi6','Gaesimgswap')"><img name="navi1" src="grafik/home.png"></a>
<a href="biografie.php" OnMouseover = "Wechseln('navi2','Bioimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi2','Bioimg');Wechseln('navi6','Gaesimgswap')"><img name="navi2" src="grafik/biografie.png"></a>
<a href="musik.php" OnMouseover = "Wechseln('navi3','Muimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi3','Muimg');Wechseln('navi6','Gaesimgswap')"><img name="navi3" src="grafik/musik.png"></a>
<a href="videos.php" OnMouseover = "Wechseln('navi4','Viimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi4','Viimg');Wechseln('navi6','Gaesimgswap')"><img name="navi4" src="grafik/videos.png"></a>
<a href="galerie.php" OnMouseover = "Wechseln('navi5','Galimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi5','Galimg');Wechseln('navi6','Gaesimgswap')"><img name="navi5" src="grafik/galerie.png"></a>
<a href="gaestebuch.php" OnMouseover = "Wechseln('navi6','Gaesimgswap')" OnMouseout = "Wechseln('navi6','Gaesimgswap')"><img name="navi6" src="grafik/gaestebuch_punkt.png"></a>
<a href="pressetext.php" OnMouseover = "Wechseln('navi7','Presimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi7','Presimg');Wechseln('navi6','Gaesimgswap')"><img name="navi7" src="grafik/pressetext.png"></a>
<a href="kontakt.php" OnMouseover = "Wechseln('navi8','Konimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi8','Konimg');Wechseln('navi6','Gaesimgswap')"><img name="navi8" src="grafik/kontakt.png"></a>
</div>
<div id="inhaltopaque"></div>
<div id="inhalt">
<div id="inhtitel1"><img src="grafik/gaestebuch_titel.png" alt="" border="0" height="28"></div>
</div>
<div id="gtexte">
<table width="100%"><tr>
<?PHP $i = "0";
$sql = "SELECT datum, email, text FROM gaestebuch ORDER BY id DESC";
$result = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_assoc($result)) {
$i++;
if($i%2 == 0) {echo '<tr>';}
else {echo '<tr>';} ?>
<td class="column" align="left"><?= $row['email'] ?><br/></td></tr>
<tr class="gbuch" ><td align="left" style="padding-bottom: 8px;"><?= $row['text'] ?> <?= $row['datum'] ?><br/></td>
</tr><tr><td class="gbuchline" height="5px"></td></tr>
<?PHP }
$datum = date("d.m.Y");
?>
</table>
</div>
<div id="guestin">
<br /><b> Kommentar verfassen:</b>
<br /><form action="gaestebuch.php" method="post" target="_self" enctype="multipart/form-data" name="gaestebuch">
<table width="100%" border="0" cellpadding="0" cellspacing="2"><tr>
<td class="colcom" colspan="2" >Name: <input name="form_email" type="text" id="form_email" size="30" maxlength="40" value="<?= $_POST['form_email'] ?>">
Datum: <?= $datum ?><input name="form_datum" type="hidden" id="form_datum" size="15" maxlength="20" value="<?= $datum ?>"> </td>
</tr>
<tr>
<td><br /><div> Dein Text: <?PHP
if (!isset($_POST['reset']))
{echo '<b> <font style="color:#CC0066;font-size:10px;">Der Code war falsch, bitte neu eingeben</b></font>';}
?></div>
<textarea name="form_text" style="margin-top:7px;" cols="48" rows="4" id="form_text"> <?= $_POST['form_text'] ?></textarea></td>
<td style="vertical-align:top;text-align:right;"><img src="captcha/captcha.php" border="0" title="Sicherheitscode" name="sicherheitscode" id="code" style="margin-top:4px;"><br />
<font style="font-size:8pt;">Neuer Code:</font><input type="checkbox" name="reset" value="ja"> <br />
<font style="font-size:8pt;">Code eingeben:</font> <input type="text" name="sicherheitscode" size="5"><input type="submit" id="gbinput" name="upload" value="Absenden">
</td>
</tr>
</table>
</form>
</div>
</div>
</body>
<?php echo '</html>';
exit; }
else
{
header("Location: http://http://www.artkom.ch/anna/gaestebuch.php"); /* Browser umleiten */
exit;
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>Anna Warzinek</title>
.... site from above displayed again.
I used metatag for IE 8, it does not work without as well.
Do you know the reason?
Link:
http://www.artkom.ch/anna/gaestebuch.php
Code:
<?php
session_start();
$host = "";
$user = "";
$password = "";
$db = "";
$link = mysql_connect($host, $user, $password) or die("Fehler beim verbinden mit dem Datenbankserver");
mysql_select_db($db) or die("Fehler beim verbinden mit der Datenbank");
if (!isset($_POST['form_datum'])) $_POST['form_datum'] = '';
if (!isset($_POST['form_email'])) $_POST['form_email'] = '';
if (!isset($_POST['form_text'])) $_POST['form_text'] = '';
if (isset($_POST['upload']))
{
if(isset($_SESSION['captcha_spam']) && $_POST["sicherheitscode"] == $_SESSION['captcha_spam'])
{
unset($_SESSION['captcha_spam']);
if (isset($_POST['form_datum']) && ($_POST['form_email']) && ($_POST['form_text']))
{
$sql = "INSERT INTO gaestebuch (datum, email, text) VALUES (
'".$_POST['form_datum']."',
'".$_POST['form_email']."',
'".$_POST['form_text']."'
)";
$result = mysql_query($sql);
if ($result=='1') {
header("Location: http://www.artkom.ch/anna/gaestebuch.php"); /* Browser umleiten */
exit;
}
else
{
header("Location: http://www.artkom.ch/anna/gaestebuch.php"); /* Browser umleiten */
exit;
}
}
else
{
$status = "...fehlgeschlagen '".mysql_error()."'";
}
}
else if (isset($_POST['form_datum']) && ($_POST['form_text']) && $_POST["sicherheitscode"] != $_SESSION['captcha_spam'])
{
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> '; ?>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>Anna Warzinek</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description"
<meta name="keywords"
<meta name="Robots" content="INDEX,FOLLOW">
<meta name="Revisit" content="After 30 days">
<link href="scripts/anna_warzinek_main.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="jscode.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="/scripts/jquery.ez-bg-resize.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("body").ezBgResize({
img : "grafik/hintergrund_gaestebuch.png", // Relative path example. You could also use an absolute url (http://...).
opacity : 1, // Opacity. 1 = 100%. This is optional.
center : true // Boolean (true or false). This is optional. Default is true.
});
});
</script>
</head>
<body >
<div id="main" >
<div id="logo"><img src="grafik/aw_logo.png" alt="anna warzinek" border="0" width="370"></div>
<div align="left" id="navi">
<a href="index.php" OnMouseover = "Wechseln('navi1','Homeimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi1','Homeimg');Wechseln('navi6','Gaesimgswap')"><img name="navi1" src="grafik/home.png"></a>
<a href="biografie.php" OnMouseover = "Wechseln('navi2','Bioimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi2','Bioimg');Wechseln('navi6','Gaesimgswap')"><img name="navi2" src="grafik/biografie.png"></a>
<a href="musik.php" OnMouseover = "Wechseln('navi3','Muimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi3','Muimg');Wechseln('navi6','Gaesimgswap')"><img name="navi3" src="grafik/musik.png"></a>
<a href="videos.php" OnMouseover = "Wechseln('navi4','Viimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi4','Viimg');Wechseln('navi6','Gaesimgswap')"><img name="navi4" src="grafik/videos.png"></a>
<a href="galerie.php" OnMouseover = "Wechseln('navi5','Galimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi5','Galimg');Wechseln('navi6','Gaesimgswap')"><img name="navi5" src="grafik/galerie.png"></a>
<a href="gaestebuch.php" OnMouseover = "Wechseln('navi6','Gaesimgswap')" OnMouseout = "Wechseln('navi6','Gaesimgswap')"><img name="navi6" src="grafik/gaestebuch_punkt.png"></a>
<a href="pressetext.php" OnMouseover = "Wechseln('navi7','Presimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi7','Presimg');Wechseln('navi6','Gaesimgswap')"><img name="navi7" src="grafik/pressetext.png"></a>
<a href="kontakt.php" OnMouseover = "Wechseln('navi8','Konimgswap');Wechseln('navi6','Gaesimg')" OnMouseout = "Wechseln('navi8','Konimg');Wechseln('navi6','Gaesimgswap')"><img name="navi8" src="grafik/kontakt.png"></a>
</div>
<div id="inhaltopaque"></div>
<div id="inhalt">
<div id="inhtitel1"><img src="grafik/gaestebuch_titel.png" alt="" border="0" height="28"></div>
</div>
<div id="gtexte">
<table width="100%"><tr>
<?PHP $i = "0";
$sql = "SELECT datum, email, text FROM gaestebuch ORDER BY id DESC";
$result = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_assoc($result)) {
$i++;
if($i%2 == 0) {echo '<tr>';}
else {echo '<tr>';} ?>
<td class="column" align="left"><?= $row['email'] ?><br/></td></tr>
<tr class="gbuch" ><td align="left" style="padding-bottom: 8px;"><?= $row['text'] ?> <?= $row['datum'] ?><br/></td>
</tr><tr><td class="gbuchline" height="5px"></td></tr>
<?PHP }
$datum = date("d.m.Y");
?>
</table>
</div>
<div id="guestin">
<br /><b> Kommentar verfassen:</b>
<br /><form action="gaestebuch.php" method="post" target="_self" enctype="multipart/form-data" name="gaestebuch">
<table width="100%" border="0" cellpadding="0" cellspacing="2"><tr>
<td class="colcom" colspan="2" >Name: <input name="form_email" type="text" id="form_email" size="30" maxlength="40" value="<?= $_POST['form_email'] ?>">
Datum: <?= $datum ?><input name="form_datum" type="hidden" id="form_datum" size="15" maxlength="20" value="<?= $datum ?>"> </td>
</tr>
<tr>
<td><br /><div> Dein Text: <?PHP
if (!isset($_POST['reset']))
{echo '<b> <font style="color:#CC0066;font-size:10px;">Der Code war falsch, bitte neu eingeben</b></font>';}
?></div>
<textarea name="form_text" style="margin-top:7px;" cols="48" rows="4" id="form_text"> <?= $_POST['form_text'] ?></textarea></td>
<td style="vertical-align:top;text-align:right;"><img src="captcha/captcha.php" border="0" title="Sicherheitscode" name="sicherheitscode" id="code" style="margin-top:4px;"><br />
<font style="font-size:8pt;">Neuer Code:</font><input type="checkbox" name="reset" value="ja"> <br />
<font style="font-size:8pt;">Code eingeben:</font> <input type="text" name="sicherheitscode" size="5"><input type="submit" id="gbinput" name="upload" value="Absenden">
</td>
</tr>
</table>
</form>
</div>
</div>
</body>
<?php echo '</html>';
exit; }
else
{
header("Location: http://http://www.artkom.ch/anna/gaestebuch.php"); /* Browser umleiten */
exit;
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>Anna Warzinek</title>
.... site from above displayed again.