tnoehles
Neues Mitglied
Hallo ich habe hier ein Loginsystem, weil ich dat von oben nit hinbekomme mit einem Layout und so. Nur eine Frage was ist der Fehler in Zeile 36?
das is die fehlermeldung: Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /usr/export/www/vhosts/funnetwork/hosting/tnoehles/tb/admin.php on line 36
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /usr/export/www/vhosts/funnetwork/hosting/tnoehles/tb/admin.php on line 36
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
PHP:
<?php
// die admin.php
if(isset($_GET['action']) AND ("logout" == $_GET['action'])) {
session_destroy();
echo "<p>\n";
echo " Sie haben sich ausgeloggt. Um wieder in den Adminbereich\n";
echo " zu kommen müssen sie sich wieder Einloggen\n";
echo "</p>\n";
} else {
if(isset($_POST['UserID']) AND '0' == $_POST['UserID']) {
echo "<p class=\"error\">\n";
echo " Bitte wählen sie einen Benutzernamen aus.\n";
echo "</p>\n";
} else {
if(isset($_POST['UserID'], $_POST['Password']) AND
login_right(addslashes($_POST['UserID']),
addslashes($_POST['Password']))) {
echo "<p>\n";
echo "Willkommen im Adminbereich\n";
echo "</p>\n";
} else {
echo "<form action=\"index.php?section=admin\" method=\"post\" class=\"formular\">\n";
echo " <p>\n";
echo " Adminbereich\n";
echo " </p>\n";
echo " <ol>\n";
echo " <li>\n";
echo " <label for=\"name\">Name</label>\n";
$sql = "SELECT
ID,
Name
FROM
users
ORDER BY
Name ASC;";
$result = mysql_query($sql) OR die(mysql_error());
echo " <select size=\"1\" name=\"UserID\" id=\"name\">\n";
echo " <option value=\"0\" selected=\"selected\">Bitte wählen</option>\n";
while($row = mysql_fetch_assoc($result)) {
echo "<option value=\"".$row['ID']."\">".$row['Name']."</option>\n";
}
echo " </select>\n";
echo " </li>\n";
echo " <li>\n";
echo " <label for=\"password\">Password</label>\n";
echo " <input type=\"password\" name=\"Password\" id=\"password\" />\n";
echo " </li>\n";
echo " <li>\n";
echo " <input type=\"submit\" name=\"submit\" value=\"Speichern\" />\n";
echo " <input type=\"reset\" name=\"submit\" value=\"Zurücksetzen\" />\n";
echo " </li>\n";
echo " </ol>\n";
echo "</form>\n";
}
}
}
?>
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /usr/export/www/vhosts/funnetwork/hosting/tnoehles/tb/admin.php on line 36
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)