G
general_xxx
Guest
Hi Leute,
ich hab da nochmal ein Problem und bräuchte nochmal eure hilfe.
Das hier ist mein Login-Script :
Das script finktioniert eigentlich einwandfrei und ist syntaktisch ok(auch wenn das hier leicht verschoben ist).
Das einzige problem ist, dass wenn der login erfolgreich ist, soll Login erfolgreich!" ausgegeben werden.
Dies geschieht zwar auch, aber unter diesem text kommt das hier :
Diese meldung kommt aber nur wenn eine neue Session gestartet wird, dass bedeutet wenn man ohne sich auszuloggen und damit ohne die session zu zerstören, sich erneut "einloggt", kommt auch nur die Meldung : "Login Erfolgreich!" ... so sollte es eigentlich immer sein.
Jetzt habe ich in der php.ini schon die folgenen einträge von 1 auf 0 gesetzt, trozdem hat sich nichts geändert.
session.bug_compat_42 = 0
session.bug_compat_warn = 0
Hat jemand eine ahnung wie ich das ändern kann ?
oder sollte man was am script ändern ?
Mfg
Marek
ich hab da nochmal ein Problem und bräuchte nochmal eure hilfe.
Das hier ist mein Login-Script :
PHP:
<?php
session_start();
require("connect.inc.php");
include "config.inc.php";
if(!isset($_POST['submit'])) {
$inhalt .='<html><body background="template/content2.jpg"><a href="index.php"><img src="template/button/buttonHome.jpg" width="130" height="18" border="0"></a> <a href="registrieren.php"><img src="template/button/buttonRegistrieren.jpg" width="130" height="18" border="0"></a> <a href="login.php"><img src="template/button/buttonLogin.jpg" width="130" height="18" border="0"></a> <a href="statistiken.php"><img src="template/button/buttonStatistiken.jpg" width="130" height="18" border="0"></a>';
$inhalt .= '<form action="login.php" method="post">
<table width="100%" border="0" cellpadding="5" cellspacing="1" align="center">
<tr>
<td align="center" colspan="2">
<b>Einloggen bei collectmoney.eu</b>
</td>
</tr>
<tr>
<td align="center">Benutzername : <input type="text" name="username" size="20" class="input"></td>
</tr>
<tr>
<td align="center">Passwort : <input type="password" name="password" size="20" class="input"></td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" name="submit" value="Login" class="button">
</td>
</tr>
</table>
</form>';
}elseif(!$_POST['username'] || $_POST['username'] == "") {
$inhalt .='<html><body background="template/content2.jpg"><a href="index.php"><img src="template/button/buttonHome.jpg" width="130" height="18" border="0"></a> <a href="registrieren.php"><img src="template/button/buttonRegistrieren.jpg" width="130" height="18" border="0"></a> <a href="login.php"><img src="template/button/buttonLogin.jpg" width="130" height="18" border="0"></a> <a href="statistiken.php"><img src="template/button/buttonStatistiken.jpg" width="130" height="18" border="0"></a>';
$inhalt .= '<p align="center">Bitte einen Benutzernamen angeben !<br><br><a href="login.php">Zurück</a></p>';
}elseif(!$_POST['password'] || $_POST['password'] == "") {
$inhalt .='<html><body background="template/content2.jpg"><a href="index.php"><img src="template/button/buttonHome.jpg" width="130" height="18" border="0"></a> <a href="registrieren.php"><img src="template/button/buttonRegistrieren.jpg" width="130" height="18" border="0"></a> <a href="login.php"><img src="template/button/buttonLogin.jpg" width="130" height="18" border="0"></a> <a href="statistiken.php"><img src="template/button/buttonStatistiken.jpg" width="130" height="18" border="0"></a>';
$inhalt .= '<form action="login.php" method="post">';
$inhalt .= '<p align="center">Bitte ein Passwort angeben !<br><br>';
$inhalt .= '<input type="hidden" name="username" value="'.$_POST['username'].'">';
$inhalt .= '<input type="submit" name="zurueck" value="Zurück">';
$inhalt .= '</p>';
$inhalt .= '</form>';
}else{
$password = md5($_POST['password']);
$query = @mysql_query("SELECT user, passwort, aktiviert FROM dieb_user_".$digit." WHERE user = '".$_POST['username']."'") or die('Select ist fehlgeschlagen!');
$result = @mysql_fetch_array($query) or die('<p align="center">Der gewählte Benutzername existiert nicht!<br><a href="index.php">Zurück</a><BR><a href="neu.php">Anmelden</a></p>');
if($password != $result['passwort']){
$inhalt .='<html><body background="template/content2.jpg"><a href="index.php"><img src="template/button/buttonHome.jpg" width="130" height="18" border="0"></a> <a href="registrieren.php"><img src="template/button/buttonRegistrieren.jpg" width="130" height="18" border="0"></a> <a href="login.php"><img src="template/button/buttonLogin.jpg" width="130" height="18" border="0"></a> <a href="statistiken.php"><img src="template/button/buttonStatistiken.jpg" width="130" height="18" border="0"></a>';
$inhalt .= '<form action="login.php" method="post">';
$inhalt .= '<p align="center">Bitte das richtige Passwort angeben !<br><br>';
$inhalt .= '<input type="hidden" name="username" value="'.$_POST['username'].'">';
$inhalt .= '<input type="submit" name="zurueck" value="Zurück"></p>';
$inhalt .= '</form>';
}elseif($result['aktiviert'] == '0') {
$inhalt .='<html><body background="template/content2.jpg"><a href="index.php"><img src="template/button/buttonHome.jpg" width="130" height="18" border="0"></a> <a href="registrieren.php"><img src="template/button/buttonRegistrieren.jpg" width="130" height="18" border="0"></a> <a href="login.php"><img src="template/button/buttonLogin.jpg" width="130" height="18" border="0"></a> <a href="statistiken.php"><img src="template/button/buttonStatistiken.jpg" width="130" height="18" border="0"></a>';
$inhalt .= '<form action="login.php" method="post">';
$inhalt .= '<p align="center">Der Account ist noch nicht aktiviert, bitte aktivieren sie ihn, indem sie den Link in ihrer email benutzen!<br><br>';
$inhalt .= '<input type="hidden" name="username" value="'.$_POST['username'].'">';
$inhalt .= '<input type="submit" name="zurueck" value="Zurück"></p>';
$inhalt .= '</form>';
}else{
$user = $result['user'];
session_register('user');
$inhalt .='<html><body background="template/content2.jpg"><a href="index.php"><img src="template/button/buttonHome.jpg" width="130" height="18" border="0"></a> <a href="registrieren.php"><img src="template/button/buttonRegistrieren.jpg" width="130" height="18" border="0"></a> <a href="login.php"><img src="template/button/buttonLogin.jpg" width="130" height="18" border="0"></a> <a href="statistiken.php"><img src="template/button/buttonStatistiken.jpg" width="130" height="18" border="0"></a>';
$inhalt .= '<meta http-equiv="refresh" content="1; URL=usermenue.php">';
$inhalt .= '<div align="center">Login erfolgreich !</div>';
}
}
$jahr = date(Y);
$jahranzahl = '2005-'.$jahr;
$template = implode("",file("template/style.html"));
$template = str_replace("<?inhalt?>", $inhalt, $template);
echo ($template);
?>
Das script finktioniert eigentlich einwandfrei und ist syntaktisch ok(auch wenn das hier leicht verschoben ist).
Das einzige problem ist, dass wenn der login erfolgreich ist, soll Login erfolgreich!" ausgegeben werden.
Dies geschieht zwar auch, aber unter diesem text kommt das hier :
Code:
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Diese meldung kommt aber nur wenn eine neue Session gestartet wird, dass bedeutet wenn man ohne sich auszuloggen und damit ohne die session zu zerstören, sich erneut "einloggt", kommt auch nur die Meldung : "Login Erfolgreich!" ... so sollte es eigentlich immer sein.
Jetzt habe ich in der php.ini schon die folgenen einträge von 1 auf 0 gesetzt, trozdem hat sich nichts geändert.
session.bug_compat_42 = 0
session.bug_compat_warn = 0
Hat jemand eine ahnung wie ich das ändern kann ?
oder sollte man was am script ändern ?
Mfg
Marek