git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@13 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2007-07-02 16:42:42 +00:00
parent 34708301c8
commit 0b534ce501
2 changed files with 3 additions and 2 deletions

View file

@ -31,6 +31,7 @@ if ($_POST) {
header("Location: " . $SELF . "select=" . urlencode($_GET["edit"]) . (SID ? "&" . SID : ""));
exit;
}
$error = mysql_error();
}
page_header(($_GET["where"] ? lang('Edit') : lang('Insert')) . ": " . htmlspecialchars($_GET["edit"]));
echo "<h2>" . ($_GET["where"] ? lang('Edit') : lang('Insert')) . ": " . htmlspecialchars($_GET["edit"]) . "</h2>\n";
@ -47,7 +48,7 @@ if (is_array($_GET["null"])) {
}
}
if ($_POST) {
echo "<p class='error'>" . lang('Error during saving') . ": " . htmlspecialchars(mysql_error()) . "</p>\n";
echo "<p class='error'>" . lang('Error during saving') . ": " . htmlspecialchars($error) . "</p>\n";
$data = $_POST["fields"];
foreach ($_POST["fields"] as $key => $val) {
$data[$key] = null;

View file

@ -13,7 +13,7 @@ echo "<h2>" . lang('SQL command') . "</h2>\n";
if ($_POST) {
if (!$result) {
echo "<p class='error'>" . lang('Error in query') . ": $error</p>\n";
echo "<p class='error'>" . lang('Error in query') . ": " . htmlspecialchars($error) . "</p>\n";
} else {
if (!mysql_num_rows($result)) {
echo "<p class='message'>" . lang('No rows.') . "</p>\n";