Hallo erstmal,
ich habe eine php-Seite erstellt, bei der man sich einloggen muß. Wenn man sich nun Eingeloggt hat und einem Link folgen will, wird immer wieder das Login-Fenster angezeigt
. Nach einem weiteren einloggen, kommt man dann aber nur zur Hauptseite zurück
Kann jemand mir Helfen ?
Hier der Quelltext:
PS.: Das $br ist eine Variable, die in der confic.inc.php ist (ein kleinerer Zeilenumbruch)
Vielen Dank schon im vorraus !!
ich habe eine php-Seite erstellt, bei der man sich einloggen muß. Wenn man sich nun Eingeloggt hat und einem Link folgen will, wird immer wieder das Login-Fenster angezeigt
Kann jemand mir Helfen ?
Hier der Quelltext:
Code:
<?php
$user = "test";
$password = "test";
// Includes
include('../inc/config.inc.php');
include('inc/links.inc.php');
// -- Passwort abfrage ----------------------------------------------
if(!isset($usr) or $usr!=$user) {
echo "
<table width=\"303\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" height=\"169\" bgcolor=\"#336699\" align=\"center\">
<tr>
<td bgcolor=\"#336699\" height=\"110\">
<table width=\"311\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"#FFFFFF\" height=\"136\">
<tr>
<td height=\"175\">
<div align=\"center\">
<form name=\"form1\" method=\"post\" action=\"$PHP_SELF\">
<font face=\"Verdana, Arial, Helvetica, sans-serif\">
<font size=\"2\">Name:</font>$br
<input type=\"text\" name=\"usr\">
<font size=\"2\">Passwort:</font>$br
<input type=\"password\" name=\"passwd\">
<input type=\"submit\" name=\"Submit\" value=\"Login\">
</font></div>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>";
// -- Passwort prufung ----------------------------------------------
}elseif ($usr==$user){
if($passwd==$password){
// -- Passwort richtig ----------------------------------------------
echo "
<link rel=\"stylesheet\" type=\"text/css\" href=\"$style\">
<table class=\"schrift\" border=\"0\" width=\"100%\">
<tr class=\"l\">
<td>
A<span style=\"font-variant: small-caps\">dmin</span>
I<span style=\"font-variant: small-caps\">nterface</span>
$br
</td>
</tr>
<tr class=\"m\">
<td>
<a href=\"index.php?section=link1\">Link1</a>
<a href=\"index.php?section=link2\">Link2</a>
$br
</td>
</tr>
<tr class=\"m\">
<td> ";
//-- Link Include ---------------------------------------------------
if(isset($_GET['section']) AND isset($dateien[$_GET['section']])) {
include $dateien[$_GET['section']];
}
//-------------------------------------------------------------------
echo "
</td>
</tr>
</table> ";
}
else {
// -- Passwort falsch ----------------------------------------------
echo "<center>
<font color=\"red\">ZUGRIFF FEHLGESCHLAGEN !</font>
<a href=\"#\" onclick=\"javascript:history.back()\">zurück</a>
</center>";
}
}
?>
Vielen Dank schon im vorraus !!

Kommentar