[PHP] Passwort wird nicht übermittelt

Hallo,

wenn ich auf LogIn klicke, wird das eingegebene Passwort nicht gesendet. Ich habe als Methode Post verwendet, das Passwort überprüfe ich in einer Klasse.
PHP:
<?php
/**
*
* @author < Markus Büttner >
* @version 1.0
* @module PHP
*/

/**
* CMS Klasse
*/
class CMS
{
  public function login($pass)
  {
    echo "Passwort: ".$pass;
    if($pass != "e81632c4c4"):
      $this->print_error("Falsches Passwort");
    else:
      session_start();
      $_SESSION["pass"] = $pass;
      Header("Location: session.php");
    endif;
  }
  protected function print_error($message)
  {
    echo "<b><span style=\"font-color:red;\">$message</span></b><br><button type=\"button\" onClick=\"history.back()\">zurück</button>";
    $datei = fopen("error.log","a");
    fwrite($datei,"[".date("d.m.y H:i:s")."] ".$message."\n");
    fclose($datei);
  }
}
?>
Die Index.html
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Content Management System</title>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
  </head>
  <body>
    <center>
      {include file="header.html"}
      <form action="?a=login" method="post">
        <table>
          <tr>
            <td>Passwort</td>
            <td><input type="password" name="pass" /></td>
          </tr>
        </table>
        <input type="submit" value="LogIn">
      </form>
    </center>
  </body>
</html>
 
Du findest den übermittelten Wert in $_POST['pass'] und ich sehe jetzt keine Stelle, wo du das POST ausliesst.

lG

Brabax
 
stimmt, da müsste noch so was wie das hier rein:

unset ($Variable); //Muss nich rein
$Variable=$_POST['Variable'];

(Variable durch die des Pw-Input-Feldes ersetzen :wink:)
 
Zurück
Oben