Wers Glaubt...
Viel Spaß noch. Und beim nächsten mal erstmal alles in Ruhe durchgehen!
Viel Spaß noch. Und beim nächsten mal erstmal alles in Ruhe durchgehen!
<?php
if (isset($_POST["edit_username"]) && isset($_POST["edit_password"]) && isset($_POST["edit_email"]) && isset($_POST["edit_user_level"])) {
require('assets/system/mysql.inc.php');
$edit_username = mysqli_real_escape_string($connectionid, $_POST["edit_username"]);
$edit_password = mysqli_real_escape_string($connectionid, $_POST["edit_password"]);
$edit_email = mysqli_real_escape_string($connectionid, $_POST["edit_email"]);
$edit_user_level = mysqli_real_escape_string($connectionid, $_POST["edit_user_level"]);
$sql = "UPDATE user SET ";
$sql .= "username = '$edit_username', ";
$sql .= "password = '$edit_password', ";
$sql .= "email = '$edit_email' ";
$sql .= "user_level = '$edit_user_level' ";
$sql .= "WHERE id = " . (int)$_GET["id"];
mysqli_query($connectionid, $sql);
mysqli_close($connectionid);
$meldung = "";
} else {
require('assets/system/mysql.inc.php');
$result = mysqli_query(
$connectionid,
"SELECT * FROM user WHERE id = "
. (int)$_GET["id"]);
if ($zeile = mysqli_fetch_array($result)) {
$edit_username = htmlspecialchars($zeile["username"]);
$edit_password = htmlspecialchars($zeile["password"]);
$edit_email = htmlspecialchars($zeile["email"]);
$i = (int)$_GET["id"];
}
mysqli_close($connectionid);
}
?>
Kommentar