also ich habe jetz
und als antwort
SELECT user,pass FROM acc WHERE user=".$username." AND pass=".$pwd."
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\xampplite\htdocs\usrarea\login.php on line 17
Warning: Cannot modify header information - headers already sent by (output started at C:\xampplite\htdocs\usrarea\login.php:16) in C:\xampplite\htdocs\usrarea\login.php on line 22
PHP:
<?php
$username = $_POST['name'];
$pwd = MD5($_POST['pwd']);
// Session starten
session_start ();
// Datenbankverbindung aufbauen
$connID = mysql_connect ("localhost", "root", "test");
if (!mysql_select_db ("userdata", $connID))
{
die ("Keine Verbindung zur Datenbank");
}
$sql = 'SELECT user,pass FROM acc WHERE user=".$username." AND pass=".$pwd."';
$result = mysql_query ($sql, $connID);
echo $sql;
$row = mysql_fetch_row("$result");
if (mysql_num_rows($result) == 1) {
header("Location: geheime_seite.php");
} else
header("Location: login_formular.php?fehler=1");
?>
und als antwort
SELECT user,pass FROM acc WHERE user=".$username." AND pass=".$pwd."
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\xampplite\htdocs\usrarea\login.php on line 17
Warning: Cannot modify header information - headers already sent by (output started at C:\xampplite\htdocs\usrarea\login.php:16) in C:\xampplite\htdocs\usrarea\login.php on line 22