Hi,
ich krieg das einfach nicht hin..
kann jemand bitte mal schauen?
<?php
session_start();
######################################################################
## ##
## LogIn-Skript mit PHP und MySQL von Andreas Zimare ##
## E-Mail:
andy@mg-umschulung.de ##
## Homepage 1:
http://www.mg-umschulung.de ##
## Homepage 2:
http://www.simone-und-andy.de ##
## ##
## Bei Fragen bitte eine E-Mail an die oben genannte ##
## E-Mailadresse senden ##
## ##
######################################################################
require("login/connect.inc.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>LogIn zum Adminbereich</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<?php if(!isset($_POST['submit'])) { ?>
<form action="<?php $PHP_SELF ?>" method="post">
<table width="400" bgcolor="#000000" border="0" cellpadding="5" cellspacing="1" align="center">
<tr>
<td bgcolor="#e7e7e7" align="center" colspan="2">
<b>Bitte erst anmelden</b>
</td>
</tr>
<tr>
<td width="170" bgcolor="#e7e7e7">Benutzername</td>
<td width="230" bgcolor="#ffffff"><input type="text" name="username" size="20" class="input"<?php if($_POST['username'] != "") {echo ' value="'.$_POST['username'].'"';} ?>></td>
</tr>
<tr>
<td width="170" bgcolor="#e7e7e7">Userpasswort</td>
<td width="230" bgcolor="#ffffff"><input type="password" name="userpassword" size="20" class="input"></td>
</tr>
<tr>
<td bgcolor="#e7e7e7" align="center" colspan="2">
<input type="submit" name="submit" value="Anmelden" class="button">
</td>
</tr>
</table>
</form>
<?php
}elseif(!isset($_POST['username']) || $_POST['username'] == "") {
echo '<p align="center">Einen Benutzernamen brauchen wir schon ;-)<br><br><a href="index.php">Zurück</a></p>';
}elseif(!$_POST['userpassword'] || $_POST['userpassword'] == "") {
echo '<form action="login/index.php" method="post">';
echo '<p align="center">Ein userpasswort brauchen wir schon ;-)<br><br>';
echo '<input type="hidden" name="username" value="'.$_POST['username'].'">';
echo '<input type="submit" name="zurueck" value="Zurück">';
echo '</p>';
echo '</form>';
}else{
$userpasswordword = md5($userpassword);
$query = @mysql_query("SELECT username, userpassword FROM bb4_user_table WHERE username = '".$_POST['username']."'") or die('Select ist fehlgeschlagen!');
$result = @mysql_fetch_array($query) or die('<p align="center">Sorry, aber dieser Benutzername existiert nicht!<br><a href="index.php">Zurück</a></p>');
if($userpasswordword != $result['userpassword']){
echo '<form action="index.php" method="post">';
echo '<p align="center">Sorry, aber dieses userpasswordwort ist falsch!<br><br>';
echo '<input type="hidden" name="username" value="'.$_POST['username'].'">';
echo '<input type="submit" name="zurueck" value="Zurück"></p>';
echo '</form>';
die;
}else{
$username = $result['username'];
session_register('username');
echo '<p align="center">LogIn erfolgreich<br><br><a href="sichere_seite.php">Weiter</a></p>';
?>
<script language="JavaScript">
window.setTimeout('window.location.href="login/sichere_seite.php"','3000')
</script>
<?php
}
}
?>
</body>
</html>
Dann die HTML in die ich das Login bauen will:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Member-Area</TITLE>
<link rel="stylesheet" type="text/css" href="style.css">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!-- ImageReady Styles (Vorlage2header3.psd) -->
<STYLE TYPE="text/css">
<!--
#index-05 {
position:absolute;
left:0px;
top:0px;
width:0px;
height:0px;
}
.wmtl{font-family:Verdana,Arial,Geneva;font-weight:bold;font-size:10px;color:#FFFFFF;} .wmds{font-family:Verdana,Arial,Geneva;font-size:11px;color:#FFFFFF;font-weight:bold;} .wmtd {font-family:Verdana,Arial,Geneva;font-size:11px;color:#FFFFFF;} .wmbt{font-family:Verdana,Arial,Geneva;font-size:11px;}-->
</STYLE>
<!-- End ImageReady Styles -->
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<!-- ImageReady Slices (Vorlage2header3.psd) -->
<DIV ID="index-05" style="z-index: 0">
<div style="position: absolute; width: 427px; height: 538px; z-index: 1; left: 11px; top: 24px" id="Ebene1">
<div style="position: absolute; width: 432px; height: 166px; z-index: 1; left: -1px; top: 100px" id="Ebene3">
</div>
<img border="0" src="images/images/loginUo.jpg" width="439" height="552"><p> </div>
<p>
<IMG SRC="images/news.gif" WIDTH=454 HEIGHT=574></DIV>
<!-- End ImageReady Slices -->
<div style="position: absolute; width: 428px; height: 169px; z-index: 1; left: 12px; top: 122px" id="Ebene2">
</div>
</BODY>
</HTML>