martin-schulz
Mitglied
Nein ich habe mich noch nicht damit beschäftigt.
Ist das sehr schwer mein script umzuschreiben.
Ist das sehr schwer mein script umzuschreiben.
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
ob_start();
$username = mysql_real_escape_string($_POST["username"]);
$passwort = md5(mysql_real_escape_string($_POST["password"]));
$username = mysql_real_escape_string($_POST["username"]);
$passwort = mysql_real_escape_string($_POST["password"]);
$sql="SELECT name, passwort FROM $DB_TB_NAME_ADMIN WHERE name = '$username' AND passwort = md5('$passwort')";
<?php
$username = $_POST["username"];
$passwort = $_POST["password"];
//Auslesen der Datenbank
mysql_connect("$BD_SERVER","$DB_NUTZER","$DB_PASSWORT");
mysql_select_db("$DB_NAME");
$sql="SELECT name, passwort FROM $DB_TB_NAME_ADMIN WHERE name = '$username' AND passwort = md5('$passwort')";
if (mysql_num_rows($result)==0)
{
echo "<br>\n";
echo "Benutzername und/oder Passwort waren <b><font color=\"#ff0000\">falsch</font></b>.\n";
echo "<br>\n<br>\n<br>\n";
echo "<div align=\"center\"><input type=\"button\" value=\" zurück \"class=\"button\" onclick=\"document.location.href='index.php'\"></div>\n<br>\n<br>\n<br>\n";
}
else
{
$result=mysql_query($sql);
$row = mysql_fetch_object($result);
$_SESSION["username"] = $username;
echo "<br>\n";
echo "Hallo <b>\"" . $username . "\"</b> du hast dich <b><font color=\"#00ff00\">erfolgreich</font></b> angemeldet\n";
echo "<br>\n<br>\n<br>\n";
echo "<div align=\"center\"><input type=\"button\" value=\" weiter \" class=\"button\" onclick=\"document.location.href='index.php?section=31'\"></div>\n<br>\n<br>\n<br>\n";
}
?>
So lautet zumindest der Stand vom 17.08.08 um 00:40 Uhr.Und zu dem mysql_real_escape_string...
schicke deine Formulardaten durch diese Funktion um Sicherheitslücken zu schliessen und SQL Injections zu vermeiden.
PHP:$username = mysql_real_escape_string($_POST["username"]); $passwort = md5(mysql_real_escape_string($_POST["password"]));
Aber ich habe es ins PHP beispiel reingeschrieben. Sorry about that...